*
The moose likes EJB and other Java EE Technologies and the fly likes MDBs and transactions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "MDBs and transactions" Watch "MDBs and transactions" New topic
Author

MDBs and transactions

Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
MDBs basically work asynchronously and are not part of transactions as well. But i was wondering is there a way they can behave synchronously and become part of a transaction?

The reason why i am asking is that i have to change the code of some old project, where lots of MDBs are called serially , These MDBs call Session Beans which in turn call CMPs. Now the calls to CMPs are not in single transaction, as they are called via MDB. Is there some way I can make all the calls to CMPs in one single transaction without removing MDBs and changing lots of code ?

Thanks


Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
Brian Tinnel
Ranch Hand

Joined: Aug 25, 2003
Posts: 69
There is no way to make the MDB synchronous, but there are third party transaction managers that might allow an MDB to join an existing transaction. I would think that the code to do that would be much harder than converting the MDBs to stateless session beans.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MDBs and transactions