|
Problem(Abstract) |
Depending on the data source lookup coding of an
application, a "WTRN0062E:An illegal attempt to use multiple resources
that have only one-phase capability has occurred within a global
transaction." exception might be issued after installation of cumulative
fix 4 (V5.0.1.4) or higher. |
|
|
|
Cause |
There is a defect in WebSphere® Application Server V5.0
releases prior to V5.0.2.4 that incorrectly allows for direct lookups of
resources to use information in the resource reference. This should be
allowed only for indirect lookups of the form
java:comp/env/resource. This defect is fixed by APAR PQ83300, which
is included in WebSphere Application Server V5.0.2.4.
Because the authentication types do not match, the connection cannot be
shared, and a new connection must be created. Since there are two 1PC
resources in the same transaction, the WTRN0062E error is generated.
Before the fix for PQ83300, you could use the resource reference settings
for both lookups, and the direct lookup used the settings for the resource
reference, resulting in a shared connection. Now it cannot be shared, so
two separate connections are necessary. |
|
|
Resolving the
problem |
There are several options to resolve this problem.
- Use an XA DataSource.
- Modify the application so that it always uses an indirect JNDI lookup
(java:comp/env/jdbc/ds1), or always uses a direct JNDI lookup (jdbc/ds1).
It is recommended that you use an indirect lookup.
- Modify the resource reference so that it matches the default
properties. For example, Res-auth=application.
The best solution is the second, because it allows the connection to be
shared, requiring fewer system resources. Furthermore, if there are any
other settings that you want to change for both connections, such as
isolation level, changing them on the resource reference applies to both
connections. |
|
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Application Servers |
Runtimes for Java Technology |
Java SDK |
|
|
|
|
|
|