Is it possible to set up Tyrex to function as a JTA transaction manager outside of any containers and app servers?
Specifically, I am interested in JTA management of an Oracle datasource. However, after performing what I think is a valid set-up of a TransactionDomain, I either get no transaction-control (using the non-XA drivers) or exceptions (using the XA drivers).
The exception I get from the XA-compliant driver is:
java.sql.SQLException: ORA-02089: COMMIT is not allowed in a subordinate session
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1311)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:738)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1313)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232)
at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1353)
at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1760)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1805)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:322)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:366)
at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:102)
at tyrex.tm.impl.TransactionImpl.addNewResource(TransactionImpl.java:2717)
at tyrex.tm.impl.TransactionImpl.enlistResource(TransactionImpl.java:669)
at tyrex.tm.impl.TransactionManagerImpl.enlistResource(TransactionManagerImpl.java:368)
at tyrex.resource.jdbc.ConnectionPool.getConnection(ConnectionPool.java:417)
at tyrex.resource.jdbc.ConnectionPool.getConnection(ConnectionPool.java:398)
at tests.TestTyrexSetup.execute(TestTyrexSetup.java:71)
at tests.TestTyrexSetup.main(TestTyrexSetup.java:49)
18 Jul 2002 11:37:45:tyrex.default:ERROR Error oracle.jdbc.xa.OracleXAException[code -3 - oracle.jdbc.xa.OracleXAException] reported in transaction xid:00e0ffce-5eb4fa86d51173830410beb4b586df86 oracle error code: 65535
oracle.jdbc.xa.OracleXAException
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:467)
Can anyone help with this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is it possible to set up Tyrex to function as a JTA transaction manager outside of any containers and app servers?
Specifically, I am interested in JTA management of an Oracle datasource. However, after performing what I think is a valid set-up of a TransactionDomain, I either get no transaction-control (using the non-XA drivers) or exceptions (using the XA drivers).
The exception I get from the XA-compliant driver is:
java.sql.SQLException: ORA-02089: COMMIT is not allowed in a subordinate session
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1311)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:738)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1313)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232)
at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1353)
at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1760)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1805)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:322)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:366)
at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:102)
at tyrex.tm.impl.TransactionImpl.addNewResource(TransactionImpl.java:2717)
at tyrex.tm.impl.TransactionImpl.enlistResource(TransactionImpl.java:669)
at tyrex.tm.impl.TransactionManagerImpl.enlistResource(TransactionManagerImpl.java:368)
at tyrex.resource.jdbc.ConnectionPool.getConnection(ConnectionPool.java:417)
at tyrex.resource.jdbc.ConnectionPool.getConnection(ConnectionPool.java:398)
at tests.TestTyrexSetup.execute(TestTyrexSetup.java:71)
at tests.TestTyrexSetup.main(TestTyrexSetup.java:49)
18 Jul 2002 11:37:45:tyrex.default:ERROR Error oracle.jdbc.xa.OracleXAException[code -3 - oracle.jdbc.xa.OracleXAException] reported in transaction xid:00e0ffce-5eb4fa86d51173830410beb4b586df86 oracle error code: 65535
oracle.jdbc.xa.OracleXAException
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:467)
Can anyone help with this?
Can you make sure that JServer is enabled for Oracle?
Thanks
Riad
Sorry for the late response.
I did verify that JServer is running on that Oracle database (JServer Release 8.1.6.0.0).
Do you need to setup 8.1.6 for JDBC XA like install the XA java classes on the database? I only test against 8.1.7
Riad