2 Replies Latest reply on Nov 4, 2002 3:08 AM by arno.huetter

    Oracle XA / XAException

    arno.huetter

      Hello there,

      as transactional DataSources are strongly recommended for CMP, I tried to move from oracle.jdbc.driver.OracleDriver on to oracle.jdbc.xa.client.OracleXADataSource. Basically I adapted docs/examples/jca/oracle-xa-service.xml (I had to touch the driver settings though, changing it from oci to thin), plus set XidFactory's "Pad"-attribute to true in jboss-service.xml, and deployed my application for the new XADataSource. I use JBoss 3.0.3, Oracle 8.1.7 thin driver, CMT.

      My tables are still being created on deployment, but the first database access(EJB-QL finder method on home interface, called by a stateless session bean) now fails, dumping the following stacktrace:

      14:32:43,128 WARN [TxCapsule] XAException: tx=XidImpl [FormatId=257, GlobalId=c
      lone_int//1, BranchQual=] errorCode=XAER_PROTO
      javax.transaction.xa.XAException
      at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:146)
      at org.jboss.tm.TxCapsule.startResource(TxCapsule.java:1232)
      at org.jboss.tm.TxCapsule.enlistResource(TxCapsule.java:726)
      at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:102)
      at org.jboss.resource.connectionmanager.XATxConnectionManager$XAConnectionEventListener.enlist(XATxConnectionManager.java:262)
      at org.jboss.resource.connectionmanager.XATxConnectionManager.managedConnectionReconnected(XATxConnectionManager.java:202)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:534)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
      at org.jboss.resource.adapter.jdbc.JDBCDataSource.getConnection(JDBCDataSource.java:110)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:92)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntitiesCommand.execute(JDBCFindEntitiesCommand.java:40)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntities(JDBCStoreManager.java:549)
      at org.jboss.ejb.plugins.CMPPersistenceManager.findEntities(CMPPersistenceManager.java:348)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntities(CachedConnectionInterceptor.java:323)
      at org.jboss.ejb.EntityContainer.find(EntityContainer.java:665)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1119)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:209)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:88)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
      at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
      at org.jboss.ejb.Container.invoke(Container.java:730)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy52.findAll(Unknown Source)

      I have been browsing various forums, and found several similar issues regarding Oracle XA, but no solution yet. Any hint would be highly appreciated.

      My main motivation for employing Oracle XA is the weak performance when batch-inserting - I think this is caused due to the fact that local transaction management leads to commits on each single insert, whereas global transaction management would commit at the transactional borders of the session bean. Please correct me if I am wrong.

      Thank you.

      Kind regards,
      Arno Huetter

        • 1. Re: Oracle XA / XAException
          vickyk

          Hi,
          Have you reffered to this

          http://forum.java.sun.com/thread.jsp?forum=35&thread=243853

          >> My main motivation for employing Oracle XA is the weak >>performance when batch-inserting - I think this is >>caused due to the fact that local transaction >>management leads to commits on each single insert, >>whereas global transaction management would commit at >>the transactional borders of the session bean. Please >>correct me if I am wrong.
          Regarding the Normal Data source the Batch update can be made to commit at the end also.
          regards
          Vicky

          • 2. Re: Oracle XA / XAException
            arno.huetter

            Thanks for your reply, regarding the thread at http://forum.java.sun.com/thread.jsp?forum=35&thread=243853, how can OracleXid be configured using JBoss 3.0? When I try to add oracle.jdbc.xa.OracleXid to my TransactionManagerService MBean (as described in several postings referring to JBoss 2.x), JBoss 3.0 states that this attribute is not supported:

            08:16:32,324 INFO [ServiceConfigurator] Problem configuring service jboss:service=TransactionManager
            org.jboss.deployment.DeploymentException: No Attribute found with name: XidClassName

            Any ideas would be highly appreciated.

            Kind regards,
            Arno Huetter