Messages received from Receiver.receive() using an XA are never deleted from the database
if not withing a transactional boundary.
----------------------------------------------------------------------------------------------------------------------------------
Key: JBMESSAGING-520
URL:
http://jira.jboss.com/jira/browse/JBMESSAGING-520
Project: JBoss Messaging
Issue Type: Feature Request
Components: Messaging Core
Affects Versions: 1.0.1.CR4
Environment: Windows XP, JBossServer4.0.4GA, Oracle10G
Reporter: Joel Lindheimer
Assigned To: Ovidiu Feodorov
Create a simple receiver, but do not place it within a Transaction boundary; shut down the
server; look up the tables and you will see all the messages are still in the Messages and
MessageRef tables.
=========================================
Observations using a debbuger reveal the following:
=========================================
Looking over the org.jboss.resource.adapter.jms.JmsManagedConnection the setup method will
always call createXAQueueSession() and create an XAQueconnection as transacted and
Session.SESSION_TRANSACTED. That being the case, non-XA Queues have no message-deletion
problems with the current version (RC4) because the API removes all messages that are
"not transacted and (!ack==1). I am guessing that using XA is problematic because the
persistence layer is expecting manipulation of the transacted XASession--which for some
reason is not working in this version of Messaging. More specifically, I suspect that when
MDBs are tested you are not seeing this problem because the container is doing needed
magic to manage the XASession transacted state, and therefore everything works fine
therein. And consequently, when operating as a non-MDB client, AKA a simple Receiver,
there is something missing in the equation ergo the problems that I have been reporting
regarding the ClickCommerce applications which use Receivers and not MDBs.
Work-around: None; the strategy for my team is to NOT use an XAQueueConnection while
waiting for a fix.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira