Postgres XA-Datasource fails in JTS mode
sintetik717 Mar 20, 2014 3:42 PMHi,
I can't get to work Postgres XA datasource in JBoss EAP 6.2 configured to use JTS. Not sure if there's a bug or my misconfiguration.
My datasource is defined like this:
<xa-datasource jndi-name="java:jboss/datasources/aaa" pool-name="bbb" enabled="true">
<xa-datasource-property name="DatabaseName">mydb</xa-datasource-property>
<xa-datasource-property name="PortNumber">5432</xa-datasource-property>
<xa-datasource-property name="ServerName">myhost</xa-datasource-property>
<driver>pgsql</driver>
<xa-pool>
<interleaving>false</interleaving>
</xa-pool>
<security>
<user-name>myuser</user-name>
<password>mypwd</password>
</security>
</xa-datasource>
And JTS is configured like this:
<subsystem xmlns="urn:jboss:domain:jacorb:1.3"> | |||||||||||||||||||||||
<orb socket-binding="jacorb" ssl-socket-binding="jacorb-ssl"> | |||||||||||||||||||||||
<initializers security="identity" transactions="on"/> | |||||||||||||||||||||||
</orb> .....
|
And 1st transaction attempt fails with
22:12:58,732 WARN [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (RequestProcessor-10) IJ000305: Connection error occured: org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@10f1f69[state=NORMAL managed connection=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@7e604b connection handles=0 lastUse=1395339176869 trackByTx=true pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@1659787 pool internal context=SemaphoreArrayListManagedConnectionPool@c85fd0[pool=bbb] xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@7e604b txSync=null]: org.postgresql.xa.PGXAException: tried to call end without corresponding start call
at org.postgresql.xa.PGXAConnection.end(PGXAConnection.java:251)
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnection.end(XAManagedConnection.java:295)
at com.arjuna.ats.internal.jta.resources.jts.orbspecific.XAResourceRecord.rollback(XAResourceRecord.java:341) [jbossjts-jacorb-4.17.15.Final-redhat-4.jar:4.17.15.Final-redhat-4]
at com.arjuna.ArjunaOTS.OTSAbstractRecordPOA._invoke(OTSAbstractRecordPOA.java:213) [jbossjts-jacorb-4.17.15.Final-redhat-4.jar:4.17.15.Final-redhat-4]
at org.jacorb.poa.RequestProcessor.invokeOperation(RequestProcessor.java:306) [jacorb-2.3.2.redhat-5.jar:2.3.2.redhat-5]
at org.jacorb.poa.RequestProcessor.process(RequestProcessor.java:626) [jacorb-2.3.2.redhat-5.jar:2.3.2.redhat-5]
at org.jacorb.poa.RequestProcessor.run(RequestProcessor.java:769) [jacorb-2.3.2.redhat-5.jar:2.3.2.redhat-5]
22:12:58,754 ERROR [stderr] (RequestProcessor-40) org.omg.CORBA.TRANSACTION_ROLLEDBACK
22:12:58,754 ERROR [stderr] (RequestProcessor-40) at com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple.commit(ArjunaTransactionImple.java:414)
22:12:58,755 ERROR [stderr] (RequestProcessor-40) at com.arjuna.ats.internal.jts.ControlWrapper.commit(ControlWrapper.java:243)
22:12:58,755 ERROR [stderr] (RequestProcessor-40) at com.arjuna.ats.internal.jts.orbspecific.CurrentImple.commit(CurrentImple.java:247)
22:12:58,755 ERROR [stderr] (RequestProcessor-40) at com.arjuna.ats.jts.extensions.AtomicTransaction.commit(AtomicTransaction.java:276)
22:12:58,755 ERROR [stderr] (RequestProcessor-40) at com.arjuna.ats.internal.jta.transaction.jts.TransactionImple.commitAndDisassociate(TransactionImple.java:1296)
22:12:58,756 ERROR [stderr] (RequestProcessor-40) at com.arjuna.ats.internal.jta.transaction.jts.BaseTransaction.commit(BaseTransaction.java:130)
22:12:58,756 ERROR [stderr] (RequestProcessor-40) at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
22:12:58,756 ERROR [stderr] (RequestProcessor-40) at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:92)
22:12:58,756 ERROR [stderr] (RequestProcessor-40) at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:276)
22:12:58,756 ERROR [stderr] (RequestProcessor-40) at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:368)
22:12:58,757 ERROR [stderr] (RequestProcessor-40) at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:240)
22:12:58,757 ERROR [stderr] (RequestProcessor-40) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
22:12:58,757 ERROR [stderr] (RequestProcessor-40) at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
22:12:58,757 ERROR [stderr] (RequestProcessor-40) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
22:12:58,758 ERROR [stderr] (RequestProcessor-40) at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
22:12:58,758 ERROR [stderr] (RequestProcessor-40) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
22:12:58,758 ERROR [stderr] (RequestProcessor-40) at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
22:12:58,758 ERROR [stderr] (RequestProcessor-40) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
22:12:58,758 ERROR [stderr] (RequestProcessor-40) at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
22:12:58,759 ERROR [stderr] (RequestProcessor-40) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
22:12:58,759 ERROR [stderr] (RequestProcessor-40) at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55)
22:12:58,759 ERROR [stderr] (RequestProcessor-40) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
22:12:58,759 ERROR [stderr] (RequestProcessor-40) at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
22:12:58,760 ERROR [stderr] (RequestProcessor-40) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
22:12:58,760 ERROR [stderr] (RequestProcessor-40) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
22:12:58,760 ERROR [stderr] (RequestProcessor-40) at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)
22:12:58,760 ERROR [stderr] (RequestProcessor-40) at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:182)
22:12:58,760 ERROR [stderr] (RequestProcessor-40) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
22:12:58,761 ERROR [stderr] (RequestProcessor-40) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
22:12:58,761 ERROR [stderr] (RequestProcessor-40) at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72)
22:12:58,761 ERROR [stderr] (RequestProcessor-40) at MyBean.myMethod(Unknown Source)
In non-XA configuiration for the same DB, all the transactions work just fine.
I've tried also to tune various xa-pool params with no luck.
Please advice.
Thanks,
Sergey.