It's not a secret anymore!
The moose likes EJB and other Java EE Technologies and the fly likes Transaction Management: BMP & CMP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Transaction Management: BMP & CMP" Watch "Transaction Management: BMP & CMP" New topic

Transaction Management: BMP & CMP

Gajanan Kulkarni

Joined: Dec 29, 2005
Posts: 11

As part of my application implementation I am doing following

1. MDB gets triggered when system finds message in Q
2. MDB calls Stateless Session Bean
3. Stateless Session Beans performs operations on CMP Entiry Beans as well as BMP entity beans in following sequence
UserTransaction tx = getSessionContext().getUserTransaction();
Perform operation with CMP Entity Bean 1
Perform operation with another Stateless Session Bean
Perform operation with CMP Entity Bean 2
Perform operation with CMP Entity Bean 3
Perform operation with BMP Entity Bean 4
try {
if (tx.getStatus() !=
else {

If there a problem in BMP, I want all operations to roll back.

Am I doing anything wrong? Because I am getting problem in my BMP (last step) saying that
"illegal attempt to use multiple resources that have only one-phase capability".

Any suggestions ??
Vinay Raj
Ranch Hand

Joined: Jun 19, 2006
Posts: 81
You need to check the database driver classes configured for your datasource. They should be XA Drivers. For example, for Oracle database one should use oracle.jdbc.xa.client.OracleXADataSource.
I agree. Here's the link:
subject: Transaction Management: BMP & CMP
jQuery in Action, 3rd edition