My application consists of a number of EJB3 MDBs, which pull messages off a number of
queues and topics. The application is deployed on a cluster of 2 identical nodes. I have
installed JBM 1.4(SP3) on JB 4.2.2.
When I inject the ClusteredXAConnectionFactory the application work, but the messages are
not treated i the same transaction as the rest of the work done in my MDB. For example, I
would like to persist an Entity as well as forward a message to anther MDB. The other MDB
is dependent on the entity being persistent and available in the database.
However with ClusteredXAConnectionFactory it seems that message is sent outside the
transactional context. Rather frequently it happens that the message arrives at the next
bean, but the persistence has't finnished. The messages are however distributed evenly
across both nodes.
After a little research online, I found several posts suggestion to use JmsXA instead of
ClusteredXAConnectionFactory. This resolved my transaction problem nicely, however since
the switch the messages are no longer distributed evenly. It seems to only use the other
node, when all MDBs in the pool on one node are exhausted.
I am wondering if this is by design, as clustered XA transactions must be quite expensive,
surely. So maybe messages are only distributed to the other nodes when one nodes bean pool
is exhausted.
Please let me know if this is the correct behaviour, or what I should look at to correct
the distribution.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157742#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...