|
Problem(Abstract) |
This exception can occur when enlisting two
one-phase-commit (1PC) connections in the same transaction. |
|
|
|
Cause |
If multiple connections are requested within the same
transaction, the res-auths must match; otherwise, a second connection is
created, which leads to this exception. |
|
|
Resolving the
problem |
There are two possible solutions to this problem:
- Configure an XA capable data source.
This might not be the preferred solution, because the application ties up
two connections and incurs the additional overhead of an XA
transaction.
- Configure the application so that the same res-auth
setting is used.
For example, in CMP beans, the res-auth setting is specified when the
application is installed, but it can be changed through the administrative
console using the Map datasources for all 2.0 CMP beans and
Provide default datasource mapping for modules containing 2.0 entity
beans links.
In either case the CMP beans must specify Container for Resource
Authorization. This causes res-auth to be set to Container.
After that is done, the connection requests match if the CMP and
BMP/Servlet are accessing the same DataSource (if they are not, you must
use XA).
For future reference, to share connections, there are other settings that
must match; the isolation level, resolution control, and the connection
must be sharable. These are specified on the resource reference. |
|
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Application Servers |
Runtimes for Java Technology |
Java SDK |
|
|
|
|
|
|