activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans Bausewein (JIRA)" <>
Subject [jira] Commented: (AMQ-1719) Resource adapter stops consuming messages after broker is forcefully stopped/restarted during XA transaction.
Date Tue, 01 Jul 2008 21:22:00 GMT


Hans Bausewein commented on AMQ-1719:

The NullPointerException occurs at the last line of the 'run()' method of RemoveTransactionAction:

    private class RemoveTransactionAction implements Runnable {
        private final TransactionInfo info;   

        public RemoveTransactionAction(TransactionInfo info) {
   = info;

        public void run() {
            ConnectionId connectionId = info.getConnectionId();
            ConnectionState cs = connectionStates.get(connectionId);

Apparently there is no ConnectionState for "connectionId" (anymore).

"removeTransactionState" removes the TransactionState identified by "transactionId" from a
local Map, but since ConnectionState does not exist anymore, this is bogus.

The NullPointerException itself is not a problem, but can be avoided by putting an "if (cs
!= null) {} the last statement.

The problem probably existed already.

> Resource adapter stops consuming messages after broker is forcefully stopped/restarted
during XA transaction.
> -------------------------------------------------------------------------------------------------------------
>                 Key: AMQ-1719
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, Connector
>    Affects Versions: 5.1.0
>         Environment: Windows XP, IBM WebSphere, Oracle, Java 1.5.0
( IBM J9 VM), ActiveMQ 5.1.0 downloaded 2008-May-12.
>            Reporter: Johan Ekesparr
>         Attachments:, DemoEAR.ear, websphere_trace.log
> Have attached logs from websphere, activeMQ and also the content of the datadirectory
for details of data state ( plus the smal program used to create the scenario).
> #1. Installed the resource adapter that came with ActiveMQ into the websperhe applicationserver
and configured it to connect to external broker using failover.
> #2. Setup a JDBC XA datasource ( Oracle ) and JMS XA destination ( ActiveMQ ).
> #3. Created a small Message Driven bean that receives a JMS message that it tries to
store in the database after which it sleeps for 5 secs. And deployed it to the WebSphere appserver.
> #4. Started the activemq broker without doing any modifications since the download and
extract into the filesystem.
> #5. Started applicationserver. 
> #6. Started publishing messages to the broker
> #7. As expected the Message driven bean received the messages one-by-one and processed
> #8. Used to ctrl-C on the broker to halt it in the middle of the processing. Resulting
in a failed commit of XA transaction.
> #9. Waited a while and then started broker again.
> #10. Received Exception on client side and nothing more happened. 
> Exception in thread "ActiveMQ Transport: tcp://localhost/" java.lang.NullPointerException
>     at org.apache.activemq.state.ConnectionStateTracker$
>     at org.apache.activemq.state.Tracked.onResponses(
>     at org.apache.activemq.transport.failover.FailoverTransport$3.onCommand(
>     at org.apache.activemq.transport.WireFormatNegotiator.onCommand(
>     at org.apache.activemq.transport.InactivityMonitor.onCommand(
>     at org.apache.activemq.transport.TransportSupport.doConsume(
>     at org.apache.activemq.transport.tcp.TcpTransport.doRun(
>     at
>     at

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

View raw message