1. You have 2 EAR files in a single server instance. Not just 2 ear files, but from within a transaction of a deployed EAR file, when you try to access the other EAR file, get some data from there and try to commit the transaction. This is not allowed in arjuna API (AFAIK). To fix this, edit JBOSS_HOME/server/default/conf/jbossjta-properties.xml and add the following line
<property name="com.arjuna.ats.jta.allowMultipleLastResources" value="true" />
The problem does not stop here..The datasource has to support it.
Modify the *ds.xml to look like this ( localtxdatasource would not work) :
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<xa-datasource>
<jndi-name>CatMgrDS</jndi-name>
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
<xa-datasource-property name="URL">jdbc:mysql://192.168.157.57:3306/30cm</xa-datasource-property>
<xa-datasource-property name="User">root</xa-datasource-property>
<xa-datasource-property name="Password">root</xa-datasource-property>
<!– the minimum size of the connection pool –>
<min-pool-size>1</min-pool-size>
<!– The maximum connections in a pool/sub-pool –>
<max-pool-size>4</max-pool-size>
</xa-datasource>
</datasources>
Next step is to make sure you have the latest version of mysql-connector(in my case atleast). Versions prior to 5.1.10 doesn’t support XA datasource(ref :http://marc.info/?l=kandula-dev&m=113945114400475&w=2) I replaced my old mysql connector with the latest one.
Things should work fine then. will keep this writing up to date to my best possible extent
필자의 경우 첫번째 방법인
JBOSS_HOME/server/{instance}/conf/jbossjta-properties.xml 에
<property name="com.arjuna.ats.jta.allowMultipleLastResources" value="true" />
를 추가함으로써 해결했다.
...
<properties depends="arjuna" name="jta">
<property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGING1"
value="org.jboss.jms.server.recovery.MessagingXAResourceRecovery;java:/DefaultJMSProvider"/>
<property
name="com.arjuna.ats.jta.supportSubtransactions"
value="NO"/>
<property
name="com.arjuna.ats.jta.jtaTMImplementation"
value="com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple"/>
<property
name="com.arjuna.ats.jta.jtaUTImplementation"
value="com.arjuna.ats.internal.jta.transaction.arjunacore.UserTransactionImple"/>
<property
name="com.arjuna.ats.jta.allowMultipleLastResources"
value="true" />
</properties>
...