[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-dev
Subject:    Problem faced with hang in isSameRM of LocalAndXATransaction AMQ
From:       manucet <manu.t.george () gmail ! com>
Date:       2007-09-29 17:32:47
Message-ID: 12957811.post () talk ! nabble ! com
[Download RAW message or body]


Hi,
    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
org.apache.activemq.ActiveMQConnection. 

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

Thanks
Manu



-- 
View this message in context: \
http://www.nabble.com/Problem-faced-with-hang-in-isSameRM-of-LocalAndXATransaction-AMQ-4.1-tf4540199s2354.html#a12957811
 Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic