[jboss-user] [JBoss Messaging] - XA datasource with JBM problem

perisb do-not-reply at jboss.com
Tue Aug 19 10:58:20 EDT 2008


Following the advice in the wiki page: http://wiki.jboss.org/wiki/JBMXADataSource, 

I've almost got it working, except for the intended behavior, which I'm not seeing.

What I want is for a server component, when a certain event occurs, to send a message.  However, if the transaction that 

is active when the event occurs is rolled back, the send of the message should be rolled back, as well.  I assume that 

this is a legitimate goal.

Problem is, I am not seeing this behavior.  In my test, the originating Tx is rolled back, but the message is still 

delivered.

Now for the specifics:

The server component involved is an entity EJB, and more specifically, the code that is doing the messaging is a custom 

Interceptor written for the entity.  The purpose is to intercept certain mutator method invocations on the bean, and to 

log them to a message queue.  However, if the transaction is rolled back, so are the mutations, and so should the log 

messages.

The code is using the JMS JCA resource adaptor named java:/JmsXA to create the JMS connection.  Is there anything else I 

need to do to get the destination enlisted as an XA resource with the EJB container's TransactionManager?

-Peris

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171296



More information about the jboss-user mailing list