0 Replies Latest reply on Aug 29, 2008 3:06 PM by Jay Perkins

    OracleXAException JBoss 5.0.0.Beta4 accessing two data sourc

    Jay Perkins Newbie

      I moved this from the JBossAS5 forum - it is probably more appropriate in this forum.

      I have two data sources (both pointing to the same database) that both do some work in the same transaction. Access to the first datasource goes smoothly, but when trying to enlist the second one I get an OracleXAException - a snippet of the error and stack trace are below. I have set all of the properties that I could find on the web about OracleXAExceptions, notably:
      <track-connection-by-tx/>
      <isSameRM-override-value>false</isSameRM-override-value>
      <no-tx-separate-pools/>

      The complete data-sources-ds.xml is below. I know I am using a Beta version but I couldn't find anything referring to this type of problem for 5.0.0.Beta4.

      I did check the JMX MBean view and all of the properties seem to be correct. One item of interest, not sure if it means anything, but with full logging on, I see different InUse/Available/Max output for the different datasources.

      The first datasource output looks like this:
      [InUse/Available/Max]: [1/9/10]
      Which is good because I set a min connections of 1 and a max connections of 10.

      However the second datasource output looks like this:
      [InUse/Available/Max]: [1/19/20]
      Which is odd because I set the same min/max settings as the first data source.

      Anybody have an idea about what I am doing wrong? Please let me know if I can provide any more information.


      2008-08-28 22:37:08,051 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] isManagedConnectionFree=true mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@ca8735
      2008-08-28 22:37:08,051 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] delisting org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1103411[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@ca8735 handles=0 lastUse=1219977403535 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubject@60abc5 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@ad2738 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@72dc45 txSync=null]
      2008-08-28 22:37:08,051 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] putting ManagedConnection back into pool kill=false cl=org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1103411[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@ca8735 handles=0 lastUse=1219977403535 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubject@60abc5 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@ad2738 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@72dc45 txSync=null]
      2008-08-28 22:37:08,051 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Returning connection to pool org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1103411[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@ca8735 handles=0 lastUse=1219977428051 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubject@60abc5 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@ad2738 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@72dc45 txSync=null] [InUse/Available/Max]: [0/20/20]
      2008-08-28 22:37:09,035 WARN [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.xastart] [com.arjuna.ats.internal.jta.transaction.arjunacore.xastart] TransactionImple.enlistResource - xa_start - caught: XAException.XA_RETRY for < 131075, 27, 25, 1--53effea2:4b4:48b76019:6e-53effea2:4b4:48b76019:72 >
      2008-08-28 22:37:09,035 ERROR [STDERR] oracle.jdbc.xa.OracleXAException
      2008-08-28 22:37:09,035 ERROR [STDERR] at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:882)
      2008-08-28 22:37:09,035 ERROR [STDERR] at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:221)
      2008-08-28 22:37:09,035 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:188)
      2008-08-28 22:37:09,035 ERROR [STDERR] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:865)
      2008-08-28 22:37:09,035 ERROR [STDERR] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:499)
      2008-08-28 22:37:09,035 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:827)
      2008-08-28 22:37:09,035 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:618)
      2008-08-28 22:37:09,035 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:375)
      2008-08-28 22:37:09,035 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:516)
      2008-08-28 22:37:09,035 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:397)
      2008-08-28 22:37:09,035 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
      2008-08-28 22:37:09,035 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
      2008-08-28 22:37:09,035 ERROR [STDERR] at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
      2008-08-28 22:37:09,035 ERROR [STDERR] at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)

      Below is the data-sources-ds.xml:

      <xa-datasource>
      <jndi-name>TestResultStorePU-ds</jndi-name>
      <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
      <min-pool-size>1</min-pool-size>
      <max-pool-size>10</max-pool-size>
      
      <xa-datasource-property name="User">aaaa</xa-datasource-property>
      <xa-datasource-property name="Password">aaaa</xa-datasource-property>
      <xa-datasource-property name="URL">jdbc:oracle:thin:@aaaaa:1521:aaaa</xa-datasource-property>
      <track-connection-by-tx/>
      <isSameRM-override-value>false</isSameRM-override-value>
      <no-tx-separate-pools/>
      </xa-datasource>
      
      
      <xa-datasource>
      <jndi-name>StepStorePU-ds</jndi-name>
      <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
      <min-pool-size>1</min-pool-size>
      <max-pool-size>10</max-pool-size>
      
      <xa-datasource-property name="User">aaaa</xa-datasource-property>
      <xa-datasource-property name="Password">aaaa</xa-datasource-property>
      <xa-datasource-property name="URL">jdbc:oracle:thin:@aaaa:1521:aaaa</xa-datasource-property>
      <track-connection-by-tx/>
      <isSameRM-override-value>false</isSameRM-override-value>
      <no-tx-separate-pools/>
      </xa-datasource>