[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: LargeMessage & Failover Update
clebert.suconic@jboss.com
do-not-reply at jboss.com
Thu Jan 15 08:34:51 EST 2009
anonymous wrote :
| I'm not sure what do you mean by "called largeMessageDeliver.deliver() synchronously"
When replicating, the main method is not waiting deliver to finish and continuing its execution, hence asynchronous per definition.
When non replicating, the main is waiting deliver to finish, the main execution of the method is dependent on deliver finish, hence synchronous per definition.
The method deliverLargeMessage will return before largeMessageDeliver.deliver finished, as the method will be running on another thread.
Credits are arriving before the deliverLargeMessage was finished, hence the wrong order. The credits are arriving before the process finished which would be the natural order.
The correct order of credits is:
LargeMessageDeliver.deliverBegins:
- deliver LargeMessageHeader
while (credits)
{
- deliver LargeMessageChunks
}
creditsArriving *should arrive* after LargeMessageDeliver was finished.
This is happening because the ServerPacketHandler is not locked, and being able to be receive CreditPackets as the chunks are being sent to the client.
We would need to lock the credit receiving somehow until deliverLargeMessage is finished, but waiting the execution to finish would give you that lock naturally.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4202120#4202120
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4202120
More information about the jboss-dev-forums
mailing list