2 Replies Latest reply on Dec 4, 2003 5:54 PM by Roger Tan

    Oracle 8.0.5 XA Need HELP

    Roger Tan Newbie

      Need help !! I m trying to use XA for Oracle, but it's not working so far.

      The first JDBC driver I use results in an ugly exception when trying to get a connection.

      I changed driver, and the stack trace disappears. However when a finder is execute the following appears

      [TxConnectionManager] Could not enlist in transaction on entering meta-aware object!
      javax.transaction.SystemException: Could not register synchronization with tx: javax.transaction.RollbackException: Already marked for rollback
      at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:468)
      at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:343)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:483)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getConnection(JDBCCommand.java:707)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:168)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCFinderCommand.execute(JDBCFinderCommand.java:114)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntitiesCommand.execute(JDBCFindEntitiesCommand.java:200)
      at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.findEntities(JAWSPersistenceManager.java:292)
      at org.jboss.ejb.plugins.CMPPersistenceManager.findEntities(CMPPersistenceManager.java:311)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntities(CachedConnectionInterceptor.java:322)
      at org.jboss.ejb.EntityContainer.find(EntityContainer.java:671)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1042)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:197)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:214)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:89)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:98)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
      at

      I am pretty sure that my config files are ok. I am using JBoss 3.2.2 Final Version. Any help would be greatly appreciated. Does 8.0.5 even support XA ? Do I have to enable something in the database. I am using OCI driver.

        • 1. Re: Oracle 8.0.5 XA Need HELP
          Adrian Brock Master

          There is a script to run, something like initxa.sql

          The actual message says the transaction has already been
          rolled back when you try to get a database connection.

          Regards,
          Adrian

          • 2. Re: Oracle 8.0.5 XA Need HELP
            Roger Tan Newbie

            Hi Adrian, I've taken a look at our Oracle installation and it seems that we don't have the file. Discussions in this forum or metalink.oracle.com always revolves around 8.1.6 or above, which unfortunatelly is not used by us. I need a suggestion on the following :
            When I used MDB in combination with EntityBean ( a data source ) JBoss would emit :
            WARN [TxConnectionManager] Prepare called on a local tx. Use of local transactions on a jta transaction with more than one branch may re
            sult in inconsistent data in some cases of failure.

            My very limited understanding of XA is telling me that the warning is caused by the fact that JMS and Database are now connected to JBoss through resource adapters thereby requiring 2 phase commit, bla bla.

            Since it's not possible for me to upgrade Oracle, can you give an example scenario where an inconsistent data might result ? Any workarounds ( like controlling my own transaction ) ? Or is it possible to use local transaction manager for JMS ?

            Thanks