[jboss-user] [JCA/JBoss] - XATransaction resource enlisted as LocalTransaction

nlmarco do-not-reply at jboss.com
Sun Nov 25 10:36:43 EST 2007


Hello *,

I've a problem with a RA: Even though the ra.xml says 
<transaction-support>XATransaction</transaction-support>
my resource seems to be handled as if it was only local-tx, which leads to exceptions:

2007-11-24 22:01:18,165 WARN  [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] TransactionImple.enlistResource - XAResource.start returned: XAException.XAER_RMERR for < 131075, 27, 25, 1-7f000101:b0e1:4748910a:1a7f000101:b0e1:4748910a:31                                                                             >
  | 2007-11-24 22:01:18,165 ERROR [STDERR] javax.transaction.SystemException: TransactionImple.enlistResource - XAResource.start [com.arjuna.ats.internal.jta.transaction.arjunacore.couldnotregister] [com.arjuna.ats.internal.jta.transaction.arjunacore.couldnotregister] could not register transaction: < 131075, 27, 25, 1-7f000101:b0e1:4748910a:1a7f000101:b0e1:4748910a:31                                                                             >
  | 2007-11-24 22:01:18,166 ERROR [STDERR] 	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:747)
  | 2007-11-24 22:01:18,166 ERROR [STDERR] 	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:446)
  | 2007-11-24 22:01:18,166 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:773)
  | 2007-11-24 22:01:18,166 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:564)
  | ...

In my log file, the dumped XML says attribute LocalTransactions = true which is obviously the reason for my troubles:
2007-11-24 22:01:08,829 DEBUG [org.jboss.deployment.XSLSubDeployer] transformed into doc: <server>
  |  <mbean code='org.jboss.resource.connectionmanager.TxConnectionManager' display-name='ConnectionManager for ConnectionFactory jdo/jpox' name='jboss.jca:service=TxCM,name=jdo/jpox'>
  |   <attribute name='TrackConnectionByTx'>true</attribute>
  |   <attribute name='LocalTransactions'>true</attribute>
  |   <depends optional-attribute-name='ManagedConnectionPool'>
  |    <mbean code='org.jboss.resource.connectionmanager.JBossManagedConnectionPool' display-name='Connection Pool for DataSource jdo/jpox' name='jboss.jca:service=ManagedConnectionPool,name=jdo/jpox'>
  |     <depends optional-attribute-name='ManagedConnectionFactoryName'>
  |      <mbean code='org.jboss.resource.connectionmanager.RARDeployment' display-name='ManagedConnectionFactory for ConnectionFactory jdo/jpox' name='jboss.jca:service=ManagedConnectionFactory,name=jdo/jpox'>
  |       <attribute name='ManagedConnectionFactoryProperties'>
  |        <properties>
  |         <config-property name='ConnectionFactoryName' type='java.lang.String'>java:/jfire/datasource/jfire.nightlabs.org/xa</config-property>
  |         <config-property name='ConnectionFactory2Name' type='java.lang.String'>java:/jfire/datasource/jfire.nightlabs.org/no-tx</config-property>
  |         <config-property name='AutoStartMechanism' type='java.lang.String'>XML</config-property>
  |         <config-property name='AutoStartMechanismXmlFile' type='java.lang.String'>/home/marco/temp/jpoxAutoStart.xml</config-property>
  |         <config-property name='AutoCreateSchema' type='boolean'>true</config-property>
  |         <config-property name='AutoCreateTables' type='boolean'>true</config-property>
  |         <config-property name='AutoCreateColumns' type='boolean'>true</config-property>
  |         <config-property name='ValidateColumns' type='boolean'>true</config-property>
  |         <config-property name='AutoCreateConstraints' type='boolean'>true</config-property>
  |         <config-property name='ValidateConstraints' type='boolean'>true</config-property>
  |         <config-property name='JdoCacheCollections' type='boolean'>true</config-property>
  |         <config-property name='NontransactionalRead' type='boolean'>true</config-property>
  |         <config-property name='DetachOnClose' type='boolean'>false</config-property>
  |         <config-property name='StringDefaultLength' type='int'>255</config-property>
  |         <config-property name='JdoCacheLevel2' type='boolean'>true</config-property>
  |         <config-property name='PersistenceByReachabilityAtCommit' type='boolean'>false</config-property>
  |        </properties>
  |       </attribute>
  |       <attribute name='RARName'>jpox-jca.rar</attribute>
  |       <attribute name='ConnectionDefinition'>javax.resource.cci.ConnectionFactory</attribute>
  |       <depends optional-attribute-name='OldRarDeployment'>jboss.jca:service=RARDeployment,name='jpox-jca.rar'</depends>
  |      </mbean>
  |     </depends>
  |     <attribute name='PoolJndiName'>jdo/jpox</attribute>
  |     <attribute name='MinSize'>0</attribute>
  |     <attribute name='MaxSize'>100</attribute>
  |     <attribute name='BlockingTimeoutMillis'>30000</attribute>
  |     <attribute name='IdleTimeoutMinutes'>15</attribute>
  |     <attribute name='BackGroundValidation'>False</attribute>
  |     <attribute name='BackGroundValidationMinutes'>10</attribute>
  |     <attribute name='PreFill'>False</attribute>
  |     <attribute name='UseFastFail'>False</attribute>
  |     <attribute name='Criteria'>ByNothing</attribute>
  |    </mbean>
  |   </depends>
  |   <attribute name='JndiName'>jdo/jpox</attribute>
  |   <depends optional-attribute-name='CachedConnectionManager'>jboss.jca:service=CachedConnectionManager</depends>
  |   <depends optional-attribute-name='TransactionManagerService'>jboss:service=TransactionManager</depends>
  |  </mbean>
  |  <mbean code='org.jboss.resource.connectionmanager.ConnectionFactoryBindingService' display-name='Binding for ConnectionFactory jdo/jpox' name='jboss.jca:service=ConnectionFactoryBinding,name=jdo/jpox'>
  |   <attribute name='JndiName'>jdo/jpox</attribute>
  |   <attribute name='UseJavaContext'>true</attribute>
  |   <depends optional-attribute-name='ConnectionManager'>jboss.jca:service=TxCM,name=jdo/jpox</depends>
  |  </mbean>
  | </server>
Since I didn't write the above XML (instead I'm having a ra.xml inside the RAR and multiple *-ds.xml files [2 examples here]), I assume it is autogenerated by JBoss. Could anyone please tell me, how I can force the "LocalTransactions" attribute to be "false"?

Best regards, Marco :-)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107593#4107593

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107593



More information about the jboss-user mailing list