activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Cameron <david.a.came...@lmco.com>
Subject STATUS_NO_TRANSACTION on rollback?
Date Thu, 17 Aug 2006 23:32:46 GMT

I would like your esteemed opion of what is going on here.

I have a setup where Jencks and Spring are being combined to pull a
JmsTemplate initialized using a
org.jencks.pool.PooledSpringXAConnectionFactory to bind a
ActiveMQXAConnectionFactory into a JTA transaction using the typical
Spring/Jencks mechanisms using GeronimoTransactionManager.

This all works fine and reliable unless I actually enlist another XAResource
into the XATransaction.

Once I do enlist more than one XAResource in the Transaction  I get the logs
below.  I can reproduce this from ActiveMQ 3.2.2/Jencks 1.1 and ActiveMQ
4.0/Jencks 1.2.  I don't see the behavior when only ActiveMQ is
participating in the JTA transaction.  Obviously my goal is to have multiple
XAResources enlisted in the JTA Transaction.

The scenario is using a TransactionTemplate to start the JTA Transaction and
a JmsTemplate to get Spring to enlist the Session fromthe
ActiveMQXAConnectionFactory to join the JTA Transaction.

It looks from the stack trace like the TransactionTemplate is attemting to
commit the transaction and one of the Resources failed the prepare then
failed the rollback.  From reading source I see ActiveMQ can report this
exception if it thinks the session the rollback is being requested for has
no transaction.

This is an intermittent bug.

Is there a better/different way to do XA transacted JMS sends through
ActiveMQ?

Here is what appears to be the interesting stack trace:

13:13:32,591 [entQueue-0] DEBUG org.springframework.jms.core.JmsTemplate  -
Sending created message [ActiveMQMapMessage {commandId = 0, responseRequired
= false, messageId = null, originalDestination = null, originalTransactionId
= null, producerId = null, destination = null, transactionId = null,
expiration = 0, timestamp = 0, arrival = 0, correlationId = null, replyTo =
null, persistent = false, type = AMM_MSG, priority = 0, groupID = null,
groupSequence = 0, targetConsumerId = null, compressed = false, userID =
null, content = null, marshalledProperties = null, dataStructure = null,
redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties =
false, readOnlyBody = false} ActiveMQMapMessage{ theTable = {amm_type=0,
amm_body=[B@1172fb9} }]
13:13:32,606 [entQueue-0] DEBUG org.apache.activemq.ActiveMQSession  -
Sending message: ActiveMQMapMessage {commandId = 0, responseRequired =
false, messageId = ID:WDLWKCVV5MR-4208-1155845369045-8:0:1:1:35,
originalDestination = null, originalTransactionId = null, producerId =
ID:WDLWKCVV5MR-4208-1155845369045-8:0:1:1, destination =
queue://MoAsPoDestinationQueue, transactionId =
XID:1197822575:23000000000000005748415420444f2057452043414c4c2049543f00000000000000000000000000000000000000000000000000000000000000000000000000:02000000000000005748415420444f2057452043414c4c2049543f00000000000000000000000000000000000000000000000000000000000000000000000000,
expiration = 0, timestamp = 1155845612606, arrival = 0, correlationId =
null, replyTo = null, persistent = true, type = AMM_MSG, priority = 4,
groupID = null, groupSequence = 0, targetConsumerId = null, compressed =
false, userID = null, content =
org.apache.activeio.packet.ByteSequence@13e4653, marshalledProperties =
null, dataStructure = null, redeliveryCounter = 0, size = 0, properties =
null, readOnlyProperties = true, readOnlyBody = true} ActiveMQMapMessage{
theTable = {} }
13:13:32,606 [entQueue-0] DEBUG
org.apache.activemq.store.journal.JournalMessageStore  - Journalled
transacted message add for: ID:WDLWKCVV5MR-4208-1155845369045-8:0:1:1:35,
at: 0:94517
13:13:32,606 [entQueue-0] DEBUG
org.springframework.transaction.jta.JtaTransactionManager  - Triggering
beforeCommit synchronization
13:13:32,622 [entQueue-0] DEBUG
org.springframework.transaction.jta.JtaTransactionManager  - Triggering
beforeCompletion synchronization
13:13:32,716 [entQueue-0] DEBUG
org.springframework.transaction.jta.JtaTransactionManager  - Initiating
transaction commit
13:13:32,731 [entQueue-0] DEBUG org.apache.activemq.TransactionContext  -
End:
[globalId=2300000005748415420444f2057452043414c4c2049543f0000000000000000000000000000000000000,branchId=200000005748415420444f2057452043414c4c2049543f0000000000000000000000000000000000000]
13:13:32,731 [entQueue-0] DEBUG org.apache.activemq.TransactionContext  -
Ended XA transaction:
XID:1197822575:23000000000000005748415420444f2057452043414c4c2049543f00000000000000000000000000000000000000000000000000000000000000000000000000:02000000000000005748415420444f2057452043414c4c2049543f00000000000000000000000000000000000000000000000000000000000000000000000000
13:13:33,075 [entQueue-0] DEBUG org.apache.activemq.TransactionContext  -
Rollback:
[globalId=2300000005748415420444f2057452043414c4c2049543f0000000000000000000000000000000000000,branchId=200000005748415420444f2057452043414c4c2049543f0000000000000000000000000000000000000]
13:13:33,075 [entQueue-0] DEBUG
org.apache.activemq.transaction.XATransaction  - XA Transaction rollback:
XID:1197822575:23000000000000005748415420444f2057452043414c4c2049543f00000000000000000000000000000000000000000000000000000000000000000000000000:02000000000000005748415420444f2057452043414c4c2049543f00000000000000000000000000000000000000000000000000000000000000000000000000
13:13:33,091 [entQueue-0] DEBUG
org.apache.activemq.store.journal.JournalMessageStore  - Transacted message
add rollback for: ID:WDLWKCVV5MR-4208-1155845369045-8:0:1:1:35, at: 0:94517
13:13:33,091 [entQueue-0] ERROR
org.apache.geronimo.transaction.context.AbstractTransactionContext  - Unable
to roll back transaction
java.lang.IllegalStateException: Status is STATUS_NO_TRANSACTION
	at
org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:438)
	at
org.apache.geronimo.transaction.context.InheritableTransactionContext.rollbackAndThrow(InheritableTransactionContext.java:308)
	at
org.apache.geronimo.transaction.context.InheritableTransactionContext.complete(InheritableTransactionContext.java:199)
	at
org.apache.geronimo.transaction.context.InheritableTransactionContext.commit(InheritableTransactionContext.java:146)
	at
org.apache.geronimo.transaction.context.GeronimoTransactionManager.commit(GeronimoTransactionManager.java:81)
	at
org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:781)
	at
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:496)
	at
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:469)
	at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:126)
-- 
View this message in context: http://www.nabble.com/STATUS_NO_TRANSACTION-on-rollback--tf2124313.html#a5860755
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message