April 2003
Intermediate to advanced
750 pages
16h 53m
English
In “Creating the MDB” on page 567 we specified the transaction as Bean.
Specifying Container would have these consequences:
The default container transaction type is Required. That means that a transaction is started for the onMessage method. The resources that are part of this transaction are the messages.
This transaction would also be used for the database access in the CMP beans, and the database is another resource.
The synchronization of multiple resources requires two-phase commit.
For the CMP we used a regular JDBC driver, not the XA-compliant driver that supports two-phase commit.
At the first database access, we get an error message that the resource cannot be added:
TransactionIm E WTRN0063E: An illegal attempt to enlist ...
Read now
Unlock full access