activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AMQ-1617) XA transaction fails to prepare commit
Date Thu, 25 Jun 2009 09:57:35 GMT

     [ https://issues.apache.org/activemq/browse/AMQ-1617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gary Tully updated AMQ-1617:
----------------------------

      Component/s:     (was: Broker)
                       (was: Transport)
                   JCA Container
    Fix Version/s:     (was: 5.3.0)
                   5.4.0

A test case would help make this concrete. There have been some mods the the JCA connector
to defer connection close till a transaction completes, allowing a connection to be pooled
when a transaction is still in need of completion. 
With a test case we could verify the expected behavior against trunk. If the test still fails
with trunk or a 5.3-SNAPSHOT we will have something to work on.

> XA transaction fails to prepare commit
> --------------------------------------
>
>                 Key: AMQ-1617
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1617
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JCA Container
>    Affects Versions: 4.1.2, 5.1.0
>         Environment: Windows XP, glassfish v2 UR1
>            Reporter: Kai Hudalla
>             Fix For: 5.4.0
>
>
> I am trying to do a database update and send a message to ActiveMQ via JMS in a single
XA transaction. When tha JTA transaction manager tries to prepare the commit I get the following
in the ActiveMQ log and the transaction is rolled back.
> 2008-03-12 11:09:01,713 [/127.0.0.1:2399] DEBUG TransportConnection            - Setting
up new connection: /127.0.0.1:2399
> 2008-03-12 11:09:01,713 [/127.0.0.1:2399] DEBUG AbstractRegion                 - Adding
consumer: ID:FE-Z2965-2033-1205312064755-0:30:-1:1
> 2008-03-12 11:09:01,728 [/127.0.0.1:2399] DEBUG AMQMessageStore                - Journalled
transacted message add for: ID:FE-Z2965-2033-1205312064755-0:30:1:1:1, at: offset = 3213,
file = 1, size = 557, type = 1
> 2008-03-12 11:09:01,728 [/127.0.0.1:2399] DEBUG AbstractRegion                 - Removing
consumer: ID:FE-Z2965-2033-1205312064755-0:30:-1:1
> 2008-03-12 11:09:01,728 [/127.0.0.1:2399] DEBUG Service                        - Error
occured while processing sync command: java.lang.NullPointerException: Context is null
> java.lang.NullPointerException: Context is null
> 	at org.apache.activemq.broker.TransportConnection.processPrepareTransaction(TransportConnection.java:375)
> 	at org.apache.activemq.command.TransactionInfo.visit(TransactionInfo.java:98)
> 	at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:291)
> 	at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:181)
> 	at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
> 	at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:134)
> 	at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:204)
> 	at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
> 	at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:196)
> 	at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183)
> 	at java.lang.Thread.run(Thread.java:595)
> 2008-03-12 11:09:01,744 [/127.0.0.1:2399] DEBUG TransportConnection            - Setting
up new connection: /127.0.0.1:2399
> 2008-03-12 11:09:01,744 [/127.0.0.1:2399] DEBUG AbstractRegion                 - Adding
consumer: ID:FE-Z2965-2033-1205312064755-0:30:-1:2
> 2008-03-12 11:09:01,760 [/127.0.0.1:2399] DEBUG XATransaction                  - XA Transaction
rollback: XID:4871251:0f000000549135a246452d5a323936352c7365727665722c5033373030:46452d5a323936352c7365727665722c50333730302c01
> 2008-03-12 11:09:01,760 [/127.0.0.1:2399] DEBUG AMQMessageStore                - Transacted
message add rollback for: ID:FE-Z2965-2033-1205312064755-0:30:1:1:1, at: offset = 3213, file
= 1, size = 557, type = 1
> The problem seems to be that the current connection is unregistered from the org.apache.activemq.broker.TransportConnectionStateRegister
once the message is written to the journal and no new connection is registered before the
processPrepareTransaction invocation. However, I have no idea where to look in the code to
fix this.
> Regards,
> Kai

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message