logo       

postHook behavior change in 2.0 RC2?: msg#00149

java.dwr.user

Subject: postHook behavior change in 2.0 RC2?


I recently updated my DWR library from 2.0 RC1 (2.0M4b) to 2.0 RC2 and have
noticed a difference in the behavior of the DWREngine.endBatch, postHook
behavior. Below is some sample code w/output that demonstrates the
difference.

DWREngine.beginBatch();
myDwrService.methodA(
param1,
function() {
alert(‘methodA – completed’);
}
);
myDwrService.methodB(
param1,
function() {
alert(‘methodB – completed’);
}
);
DWREngine.endBatch(
async:true;
preHook:
function() {
alert(‘preHook – invoked’);
}
postHook:
function() {
alert(‘postHook – invoked’);
}
);

2.0 RC1 (2.0M4b) Output:
preHook – invoked
methodA – completed
methodB – completed
postHook – invoked

2.0 RC2 Output:
preHook – invoked
postHook – invoked
methodA – completed
methodB – completed

The difference here is that postHook handler in RC2 is invoked after all
calls within the batch have been *remoted* where as in RC1 the postHook was
invoked after all calls *responded*. This difference is causing me some
grief. Is there a way in RC2 to determine when all calls within a batch have
completed (i.e. responded)? I have subsequent processing that must take
place after all calls in the batch have responded to the client.

Thanks.

--
View this message in context:
http://www.nabble.com/postHook-behavior-change-in-2.0-RC2--tf3241170.html#a9009990
Sent from the DWR - Users mailing list archive at Nabble.com.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise