I'm trying to JBossMQ on JBoss AS 4.2.1 to participate in a JTA transaction.  
The client is an EJB 3.0 stateless session bean and I'm using and EJB 3.0 
message driven bean to accept the messages.  It appears that the messages are 
participating in the JTA transaction and being delivered properly (at the right 
time), however upon restart of JBoss the messages are being redelivered.

  I've completed the steps documented in the JBoss wiki 
[http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigJBossMQDB] for changing the 
underlying JMS database to MySQL and I'm using the 
@Resource(mappedName="java:/JmsXA") connection factory in the client to 
generate the message.

  The behaviours I'm witnessing are as follows:
  1) The client client initiates the message and nothing appears in the 
database until the outermost Stateless session bean commits (Expected)
  2) Once committed the message appears in the database with TXOP of 'A' 
(Expected)
  3) The message driven bean receives the message after the client has 
committed (Expected)
  4) The message has a TXOP value of 'A' and it remains 'A' until the end of 
the OnMessage call.  Upon completion of the onMessage method the TXOP value is 
changed to 'D' (Expected)
  5) I stop and restart JBoss, all the messages in the database are being 
delivered even though they have TXOP value of 'D' (Unexpected)

Some other details that may be useful, I'm sending the messages to a queue and 
the acknowledge mode is Auto-Acknowledge.

  Any ideas where I'm going wrong? How do I prevent the message from being 
delivered a second time, unless there was a problem with the first delivery?

Thanks,
Karl Martens

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067504#4067504

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067504
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to