geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "xuhongbo" <x...@tongtech.com>
Subject oracle xa datasource cannot commit twice
Date Fri, 25 Dec 2009 12:18:38 GMT
Hi:
I am using oracle xa and bean managed transaction in my
application----geronimo 2.1.4 & oracle 9i;

In my test ejb, just update a table in a bean-managed user-transaction; 
The first time , my test ejb works, but if I execute the ejb twice, the
oracle-xa-transaction will failed;
In the attachment , I list my test ejb's program and oracle-xa-datasource's
plan; and also a simple simulate-program which  doesn't use Geronimo
AppServer, but using Geronim-Transaction-Manager, and direct try oracle's XA
transaction;

The occured exception is :
2009-12-25 19:39:00,500 WARN  [Transaction] Unable to enlist XAResource
org.apache.geronimo.transaction.manager.WrapperNamedXAResource@1e7dc51,
errorCode: -3
oracle.jdbc.xa.OracleXAException
	at
oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
	at
oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:295)
	at
org.apache.geronimo.transaction.manager.WrapperNamedXAResource.start(Wrapper
NamedXAResource.java:86)
	at
org.apache.geronimo.transaction.manager.TransactionImpl.enlistResource(Trans
actionImpl.java:209)
	at
org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getCo
nnection(TransactionEnlistingInterceptor.java:54)
	at
org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConn
ection(TransactionCachingInterceptor.java:87)
	at
org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnec
tion(ConnectionHandleInterceptor.java:43)
	.......
	at java.lang.Thread.run(Unknown Source)
javax.transaction.RollbackException: Unable to commit: transaction marked
for rollback
	at
org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResourcesDur
ingCommit(TransactionImpl.java:671)
	at
org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionIm
pl.java:270)
	at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(Transa
ctionManagerImpl.java:250)
	at
org.apache.openejb.core.CoreUserTransaction.commit(CoreUserTransaction.java:
62)
	at
org.apache.openejb.core.BaseContext$UserTransactionWrapper.commit(BaseContex
t.java:194)
	at
sampleear.MyStatelessSessionBean.sayHello(MyStatelessSessionBean.java:40)
	......
	at java.lang.Thread.run(Unknown Source)

-----------------------------------------------------------------
While I havn't find the real-reason caused the exception ; but I noticed the
follow things:
	1: when execute the test ejb first-time, although I have called the
userTransaction.commit(), but the oracle 's  xa-transaction doesn't
real-complete.
	2: I have write the program to simulate the critical-work which
Geronimo have done. In the simulate program , I direct use
Geronimo-transaction-manager and direct call the oracle-xa interface. And it
work's well;	The simulator program also list in the attachment as
SimulateGeronimoTransaction.java
So I wondering if I have mis-used something in Geronimo, cause the
User-Transaction finished, but the oracle's real-xa-transaction doesn't
release.

Thanks for any suggest		

Mime
View raw message