This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes EJB, JMS and Transaction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB, JMS and Transaction" Watch "EJB, JMS and Transaction" New topic

EJB, JMS and Transaction

Olexiy Prokhorenko
Ranch Hand

Joined: Jul 11, 2004
Posts: 97
Hi there,

I have the following question.

I have Session Stateless EJB working in CMT (container-managed transactions).
It has a method, which is sending message to MDB (message driven bean) and then proceed with different changes/updates/etc. This method works in separated transaction. Possibly it could happen that after sending message to MDB - some changes/updates/etc will fail and transaction will be rolled back.
The problem is from what I understand MDB with it's onMessage() will not be rolled back.
Any ideas? Any sources where I can read more on details about transaction management during interacting with JMS?
The easiest way is to put message sending call _after_ all changes/updates/etc. will be done. But still, there some moments that could create a problem with this - and anyway, I more concern about this question as about general question.

Thanks ;-)

<a href="" target="_blank" rel="nofollow"></a><br />Free advices and help for entrepreneurs: from Idea to IPO<br />Software and IT Project Management forum
I agree. Here's the link:
subject: EJB, JMS and Transaction
jQuery in Action, 3rd edition