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 ?
Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
posted 11 years ago
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.