|
Problem(Abstract) |
Conditions under which the XAER_OUTSIDE return code might
be returned to an application that is making JDBC™ calls within a
transaction. |
|
|
|
Cause |
This reason code (XAER_OUTSIDE) means a resource manager
is doing work outside distributed transaction.
Some possible causes:
- Local transaction prior to starting a subsequent global (distributed)
transaction operation
- The data source is referred to directly using JDBC without using a
JDBC connection
- XAER_OUTSIDE means that you have an active non-XA connection to a
database before an active XA connection
In other words, the connection has been used
to update the database in a local transaction, with the connection set to
not auto commit or without the results being committed prior to a
subsequent distributed transaction operation. When a XA Global transaction
is then started it fails with this reason code, because there is work
outstanding for that datasource outside of the scope of the Global
tx.
The following error messages are logged when an EJB™ receives an
XAER_OUTSIDE from the JDBC driver's resource manager:
04-04-21 9:57:33:626 KST 7e87402a WSRdbXaResour W DSRA0302E:
XAException Error code is XAER_OUTSIDE. Exception is <null>
04-04-21 9:57:33:642 KST 7e87402a XATransaction E J2CA0027E:
Transaction ID : {XID: formatId(57415344), gtrid_length(26),
bqual_length(25),
data(00000001 7114E7C3 F47D9EBD E5E6CBB7 BD3478D2 319CB352 FC2C01E7
C3F47D9E BDE5E6CB B7BD3478 D2319CB3 52FC2C2A 401545)}
error occurs calling start at XA resource adapter of jdbc/zeus_xa
datasource.
For DB2®, the error SQL0998N Error occurred during transaction or
heuristic processing. Reason Code = reason-code Subcode = subcode is
logged with reason code 8. Reason Code 8 means XAER_OUTSIDE. |
|
|
Resolving the
problem |
Some possible solutions are:
- Set autocommit to true to commit transaction results upon completion
of the transaction.
- If the J2CA0027E message indicates the XAER_OUTSIDE occurs on a start
for an XA resource, then change the application attributes to commit for
an unresovled action or change application to complete the work on the
connection prior to using it in another transaction.
- Apply any necessary DB fixes. There have been some errors in the JDBC
code that can cause this reason code to be generated.
For DB2, the following APARs address problems in which the XAER_OUTSIDE
reason code is being returned improperly.
IY42313 -- (DB2 7.2) XA_PROTO is returned when XAER_OUTSIDE should be
returned.
IY46858 -- (DB2 8) XA_PROTO is returned when XAER_OUTSIDE should be
returned.
IY54743 -- XAER_OUTSIDE error is returned in spite of autocommit being
turned on.
IY55661 -- Getting XAER_OUTSIDE error going from V7 Client to OS390
For Oracle 9i, this Oracle bug might be applicable: 2516990
To diagnose the cause of an XAER_OUTSIDE reason code; request the
following WebSphere trace. In the Trace Specification field, type:
RRA=all=enabled:
WAS.j2c=all=enabled:
WAS.database=all=enabled:
PMGR=all=enabled:
EJBContainer=all=enabled:
JMSApi=all=enabled:
JMSHelperMBean=all=enabled:
JMSServer=all=enabled:
MQTaskHandler=all=enabled:
Messaging=all=enabled
com.ibm.ejs.cm.*=all=enabled
com.ibm.ws.Transaction.*=all=enabled
com.ibm.ws.LocalTransaction.*=all=enabled
Note: For all releases of IBM® WebSphere® Application Server V5.1,
replace the trace string com.ibm.ws.Transaction.*=all=enabled with
Transaction=all=enabled
Also request the appropriate JDBC driver traces, if applicable. |
|
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Application Servers |
Runtimes for Java Technology |
Java SDK |
|
|
|
|
|
|