Neo,

I believe I am struggling with the same problem. From what I have learned so
far, it appears that the JBoss TransactionManager sends two "start" messages
to ActiveMQ: the first when the transaction is started upon receiving the
first message in the MDB, and the second when the outgoing connection is
created. What I have seen is that the ActiveMQ broker spawns two threads to
handle these messages, effectively treating them like separate transactions.
Often the first thread will remove the transaction before the second thread
sends. When that happens the second thread throws an exception because it
can't find the transaction. Upon further inspection of the JBoss code, it
looks like JBoss correctly identifies the fact that it has already started a
transaction with the broker and signals that by including the TMJOIN flag
when starting the resource the second time. Looking at the code for
org.apache.activemq.TransactionContext, its pretty obvious ActiveMQ doesn't
handle this TMJOIN flag at all.

I am still looking for a solution myself but I hope this sheds some light on
your problem and inspires someone who knows more about what is supposed to
happen to chime in.

Andy


-- 
View this message in context: 
http://www.nabble.com/How-to-send-one-message-to-a-topic-in-MDB--tp25325925p25355114.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to