[jboss-jira] [JBoss JIRA] Commented: (JBMESSAGING-1440) JTA-prepared message delivered to other consumer.

Tim Fox (JIRA) jira-events at lists.jboss.org
Tue Nov 11 14:52:36 EST 2008


    [ https://jira.jboss.org/jira/browse/JBMESSAGING-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12437960#action_12437960 ] 

Tim Fox commented on JBMESSAGING-1440:
--------------------------------------

I asked Jesper Pederson (our JCA lead) to take a look at this, he tried it with JBoss 5, and got expected results (i.e. message wasn't redelivered).

Apparently there have been some significant changes in the JCA layer and transactions (not JBM) between the version you are using and JBoss 4.3/5.

Any chance you could try with JBoss 4.23 and or JBoss 5? If using JBoss 4.23 can you try a later version of JBM too? The latest is currently http://anonsvn.jboss.org/repos/messaging/tags/JBossMessaging_1_4_0_SP3_CP04/ which has quite a lot of fixes and changes compared to the older version you are using.

(If you have a support contract you could try 4.3, this is only available to support customers as a binary, but you could  build it from SVN from source)

Jespers comments:

I took a quick look at subject... using AS/trunk.

1. Start the server.
2. Go to JMX console + myxatest + service=Test. Invoke send.
3. Go to JMX console + jboss.messaging.destination + name=A.service=Queue. 
Verify MessageCount=1.
4. Go to JMX console + myxatest + service=Test. Invoke receive. That will 
start XA transaction; enlist DummyXAResource; get JMS connection from JCA and 
receive message. DummyXAResource sleeps 60 sec inside the commit call.
5. Verify that DummyXAResource prints "DummyXAResource commit start sleeping 
for 60 sec" message.
6. Go to JMX console + jboss.jca + name=JmsXA,service=ManagedConnectionPool 
and invoke stop(). Check that DummyXAResource finished commit and 
printed "DummyXAResource commit end" message. JBM commit fails.
7. Now we have fully prepared JBM transaction in progress. You can see one 
record in JBM_TX.
8. Go to JMX console + jboss.jca + name=JmsXA,service=ManagedConnectionPool 
and invoke start().

After this step I waited until the TX recovery kicked in (runs every 120 
secs) - and it worked as expected. 

I know that Jonathan has changed a lot between 4.2.x and trunk in the TX 
space.

I can also see that he is using 4.2.2 as the server -- I back-ported a lot of 
JCA patches for the 4.2.3 release...


> JTA-prepared message delivered to other consumer. 
> --------------------------------------------------
>
>                 Key: JBMESSAGING-1440
>                 URL: https://jira.jboss.org/jira/browse/JBMESSAGING-1440
>             Project: JBoss Messaging
>          Issue Type: Bug
>         Environment: JBoss 4.2.2 + JBM 1.4.0.SP3. Windows XP.
>            Reporter: szhigunov
>            Assignee: Tim Fox
>             Fix For: 1.4.0.SP3.CP05, 1.4.2.GA
>
>         Attachments: myxatest.zip, myxatest1.zip
>
>
> The problem is that when fully prepared tx1 fails in the commit phase, JBM delivers the message second time in tx2, while tx1 is still in progress. Eventually recovery commits tx1, so the message gets delivered and committed twice.
> The attached test (myxatest.zip) is a clean JBoss 4.2.2 + JBM 1.4.0 SP3 with my test MBean: jboss-4.2.2.GA\server\messaging\lib\myxatest.jar (code and source) + jboss-4.2.2.GA\server\messaging\deploy\myxatest-service.xml.
> Steps to reproduce the problem:
> 1.	Start the server.
> 2.	Go to JMX console + myxatest + service=Test. Invoke send.
> 3.	Go to JMX console + jboss.messaging.destination + name=A.service=Queue. Verify MessageCount=1.
> 4.	Go to JMX console + myxatest + service=Test. Invoke receive. That will start XA transaction; enlist DummyXAResource; get JMS connection from JCA and receive message. DummyXAResource sleeps 60 sec inside the commit call.
> 5.	Verify that DummyXAResource prints "DummyXAResource commit start sleeping for 60 sec" message.
> 6.	Go to JMX console + jboss.jca + name=JmsXA,service=ManagedConnectionPool and invoke stop(). Check that DummyXAResource finished commit and printed "DummyXAResource commit end" message. JBM commit fails.
> 7.	Now we have fully prepared JBM transaction in progress. You can see one record in JBM_TX.
> 8.	Go to JMX console + jboss.jca + name=JmsXA,service=ManagedConnectionPool and invoke start().
> 9.	Go to JMX console + myxatest + service=Test. Invoke receive again. Same message delivered again. And this is wrong. Wait for a minute and let transaction finish successfully.
> 10.	Got to JBM_TX and verify that transaction is still there (nobody recovered it!).
> 11.	Stop server, enable JBM recovery, start server. In couple minutes the original transaction is found and committed (second time). JBM_TX is empty.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list