activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manucet <>
Subject Problem faced with hang in isSameRM of LocalAndXATransaction AMQ 4.1
Date Sat, 29 Sep 2007 17:32:47 GMT

    I was facing a problem with the AMQ 4.1 with the LocalAndXATransaction
class's isSameRM waiting indefinitely. The wait is because waitForBrokerInfo
calls brokerInfoReceived.await()
where brokerInfoReceived is a countdown latch. Once this is waiting it
never gets resumed.

To trigger it the method onCommand(final Object o) has to be called on

On investigating I found that the async variable in VMTransport was set to
true only after the oneway method was called. This resulted in the
brokerInfo command getting lost. in the VMTransportFactory there is a
VMTransport vmtransport=server.connect();. This method calls an
a1.onAccept(configure(server)); which results in the connection starting
with async=false.
In fact in VMTransport factory the async variable was set immediately after
the connect call.

I am able to get around this problem by changing the order. 
ie moving a1.onAccept(configure(server)); out of the connect method into a
separate method and calling it after the 
IntrospectionSupport.setProperties(vmtransport,options) call.

I am not very familiar with the AMQ codebase. Can someone tell me if this is
the right approach. 
I can open a jira and attach a patch if I am on the right track. Also are
there maintenance releases of AMQ 4.1 or 4.1.x released periodically? Or do
I need to use a custom build if this patch gets integrated


View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at

View raw message