activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Brelet <johan.bre...@gmail.com>
Subject Re: ActiveMQ 4 + Jencks + XA Transactions
Date Fri, 07 Jul 2006 13:52:54 GMT

Perhaps I said a bit too fast that it was working fine... :)

Here is the problem I have now :
In my tests I try to force the broker to rollback a global XA transaction
when receiving a JMS Message. To do that, the onMessage() method throws a
RuntimeException. So, I expect the broker to catch this exception, and then
to rollback transaction, and later to try again delivering the message.
But with ActiveMQ4.1 and latest Jencks from SVN HEAD, I don't understand the
behaviour of the broker... The exception doesn't cause the transaction to
rollback, so it stays active, and the broker do not redeliver the message.
Here is a part of logs :

ERROR [org.apache.activemq.ActiveMQSession] - error dispatching message: 
java.lang.RuntimeException: (Exception thrown to rollback global
transaction)

DEBUG [org.apache.activemq.ra.ServerSessionImpl:0] - run loop end
DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] - Session returned to
pool: ServerSessionImpl:0
DEBUG [org.apache.activemq.ra.ServerSessionImpl:0] - Run finished
DEBUG [org.apache.activemq.ra.ServerSessionImpl:0] - Work completed:
javax.resource.spi.work.WorkEvent[source=Work :ServerSessionImpl:0]

DEBUG [org.apache.activemq.ra.ActiveMQEndpointWorker] - Reconnect cause: 
javax.jms.JMSException: (Exception thrown to rollback global transaction)

DEBUG [org.apache.activemq.broker.region.AbstractRegion] - Removing
consumer: ID:fr-44-01-03-003-3015-1152279054830-3:0:-1:2
DEBUG [org.apache.activemq.broker.region.AbstractRegion] - Removing
consumer: ID:fr-44-01-03-003-3015-1152279054830-3:0:-1:1
DEBUG [org.apache.activemq.transport.WireFormatNegotiator] - Sending:
WireFormatInfo { version=1, properties={TightEncodingEnabled=true,
TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true,
MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
DEBUG [org.apache.activemq.transport.tcp.TcpTransport] - TCP consumer thread
starting
DEBUG [org.apache.activemq.transport.WireFormatNegotiator] - Sending:
WireFormatInfo { version=1, properties={TightEncodingEnabled=true,
TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true,
MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
DEBUG [org.apache.activemq.transport.WireFormatNegotiator] - Received
WireFormat: WireFormatInfo { version=1, properties={StackTraceEnabled=true,
TightEncodingEnabled=true, TcpNoDelayEnabled=true, SizePrefixDisabled=false,
MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
DEBUG [org.apache.activemq.transport.tcp.TcpTransport] - TCP consumer thread
starting
DEBUG [org.apache.activemq.transport.WireFormatNegotiator] -
tcp:///127.0.0.1:3025 before negotiation: OpenWireFormat{version=1,
cacheEnabled=false, stackTraceEnabled=false, tightEncodingEnabled=false,
sizePrefixDisabled=false}
DEBUG [org.apache.activemq.transport.WireFormatNegotiator] -
tcp:///127.0.0.1:3025 after negotiation: OpenWireFormat{version=1,
cacheEnabled=true, stackTraceEnabled=true, tightEncodingEnabled=true,
sizePrefixDisabled=false}
DEBUG [org.apache.activemq.transport.WireFormatNegotiator] - Received
WireFormat: WireFormatInfo { version=1, properties={StackTraceEnabled=true,
TightEncodingEnabled=true, TcpNoDelayEnabled=true, SizePrefixDisabled=false,
MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
DEBUG [org.apache.activemq.transport.WireFormatNegotiator] -
tcp://localhost/127.0.0.1:61616 before negotiation:
OpenWireFormat{version=1, cacheEnabled=false, stackTraceEnabled=false,
tightEncodingEnabled=false, sizePrefixDisabled=false}
DEBUG [org.apache.activemq.transport.WireFormatNegotiator] -
tcp://localhost/127.0.0.1:61616 after negotiation: OpenWireFormat{version=1,
cacheEnabled=true, stackTraceEnabled=true, tightEncodingEnabled=true,
sizePrefixDisabled=false}
DEBUG [org.apache.activemq.broker.region.AbstractRegion] - Adding consumer:
ID:fr-44-01-03-003-3015-1152279054830-3:4:-1:1
DEBUG [org.apache.activemq.broker.region.AbstractRegion] - Adding consumer:
ID:fr-44-01-03-003-3015-1152279054830-3:4:-1:2
DEBUG [org.apache.activemq.transport.InactivityMonitor] - Message sent since
last write check, resetting flag
DEBUG [org.apache.activemq.transport.InactivityMonitor] - Message sent since
last write check, resetting flag
DEBUG [org.apache.activemq.transport.InactivityMonitor] - Message sent since
last write check, resetting flag
...

I don't really understand what's going on...Am I doing something wrong ? Or
is it a problem with ActiveMQ 4.1 ?
-- 
View this message in context: http://www.nabble.com/ActiveMQ-4-%2B-Jencks-%2B-XA-Transactions-tf1899733.html#a5217720
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message