About this task
Messaging engines store
persistent data in a database, using a JDBC data source to interact with that
database. Some JMS applications also store persistent data in a database,
for example if the application uses entity enterprise beans. Typically, such
applications use two-phase commit transactions to coordinate updates to the
JMS and JDBC resources involved.
You can configure your application to share
the JDBC connection used by a messaging engine,
which enables you to use one-phase commit transactions and improve the performance
of your application. You can benefit from the one-phase commit optimization
in the following circumstances:
- Your application must use the assured persistent reliability
attribute for its JMS messages.
- Your application must use CMP entity beans that are bound to the same
JDBC data source that the messaging engine uses
for its data store.
Restriction: You cannot benefit from the one-phase commit
optimization in the following circumstances:
- If your application uses a reliability attribute other than assured persistent for
its JMS messages.
- If your application uses BMP entity beans, or JDBC clients.
- If your application uses DB2 High Availability Disaster Recovery (HADR).
Before you configure your system, ensure that you consider
all of the components of your J2EE application that might be affected by one-phase
commits. To optimize for one-phase commit transactions, perform the following
steps: