APAR status
Closed as program error.
Error description
An excepton may be seen when committing a Connection in a
Local Transaction :
java.sql.SQLException: DSRA9350E: Operation Connection.commit
is not allowed during a global transaction.
This is cmvc defect 212520. It is fixed in 5.0.2.7 and
5.1.1.1
Typically, when connections are in Global transaction, commit or
rollback is not allowed on the connection, RRA will throw an
exception. when the global transaction is committed, the RRA
will reset some flags which will indicate that we are no longer
in global trans which will allow connections to be used in a
local trans.
When an app begins a global tran and then commits it, then it
tries to start and commit a local tran. The problem here is
caused by the RRA code not resetting the some flags (which
causes WAS to assume a GT) in the following scenario:
usertran.begin()
getConn1
issue select * from table1;
getConn2 //== whole new connection
update table1 set value = junk where ....
usertran.commit()
conn1.executeUpdate(...)
conn1.commit() ========> exception.
In English:
two connections are used (no sharing), one does an update and
the other just does a read, both in a global tran. When the
prepare happens the first connection (the one that reads)will
return XA_RDONLY, the other one will return XA_OK, the tx
manager then will commit only the one that had an update by
calling xa_commit(). The RRA code resets some important flag
(wasLazilyEnlisted) in the xa-commit and xa-rollback only, and
since the other connection (conn1) had no commit or rollback
issued on it, the connection will be left unchanged until the
next time a cleanup is done on it.
However, in the error scenario, it happens that a local
tran is started on the connection that didn't have the flag
reset and thus, commit failed.
Local fix Problem summary
****************************************************************
* USERS AFFECTED: All WebSphere Application Server users of *
* XA (two Phase) *
****************************************************************
* PROBLEM DESCRIPTION: Users may see something like: *
* java.sql.SQLException: DSRA9350E: *
* Operation Connection.commit is not *
* allowed during a global transaction. *
****************************************************************
* RECOMMENDATION: *
****************************************************************
In a global transaction, if one of the branches is read-only,
no local transaction would be allowed on the read-only branch
connection. For example,
UTX.begin
Connection 1 - read records
Connection 2 - update record
UTX.commit
Connection 1 - some work
Connection 1 commit or rollback, will give them the exception.
Problem conclusion
We were improperly resetting the status of the state of the
connection, that has been corrected.
Temporary fix Comments
APAR information |
APAR number |
PQ90954 |
Reported component name |
WAS BASE 5.0 |
Reported component ID |
5630A3600 |
Reported release |
10W |
Status |
CLOSED PER |
PE |
NoPE |
HIPER |
NoHIPER |
Special Attention |
NoSpecatt |
Submitted date |
2004-07-02 |
Closed date |
2004-07-20 |
Last modified date |
2005-03-15 |
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Modules/Macros
Publications Referenced
Applicable component levels |
R003 PSY |
UP |
R00A PSY |
UP |
R00H PSY |
UP |
R00I PSY |
UP |
R00P PSY |
UP |
R00S PSY |
UP |
R00W PSY |
UP |
R103 PSY |
UP |
R10A PSY |
UP |
R10H PSY |
UP |
R10I PSY |
UP |
R10P PSY |
UP |
R10S PSY |
UP |
R10W PSY |
UP |
|