anonymous wrote : >>The problem is that your code does account for the case where
FailoverCommandCenter == null (non clustered), but it's not a
MessagingShutdownException
on this case, the handleClose will aways be closed... let me explain:
The basic problem is, When JBAS is shutdown, case the handleClosing is not complete, the
ConnectionConsumer will be waiting forever. So, during a shutdown we need to ensure
ConnectionConsumer will finish
handleClosing performs a client2server communication before calling
clientConsumer.close():
public Object handleClosing(Invocation invocation) throws Throwable
| {
|
| ......
| Long l = (Long) invocation.invokeNext(); <<<< --- this line will
fail iif the server was killed...
| ....
| consumerState.getClientConsumer().close(lastDeliveryId); <<< -- if
the server was killed, nothing will close the clientConsumer
|
| ....
|
When you have failover in place, the above code is not a problem, as failover will take
care of the exception reconnecting everything.
But when you don't have a failover logic in place, nothing will close the consumer,
what will cause a hang. That's why I aways close the consumer when you don't have
a FailoverCommandCenter.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099898#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...