Problem
Process stalls and throws the following error (LiveCycle hosted on JBoss):
javax.ejb.TransactionRolledbackLocalException: Could not enlist in transaction on entering meta-aware object!; – nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a010f17:c1e:4db79191:23c4fa status: ActionStatus.ABORT_ONLY >); – nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; – nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a010f17:c1e:4db79191:23c4fa status: ActionStatus.ABORT_ONLY >))
Explanation
Within the same process, 2 calls were being made to different non-XA data sources. This is not supported by default on JBoss. Hence the error is thrown.
Solution
To enable calling more than 1 non-XA data source within the same transaction (process), additional configuration is required -
1. Locate the jbossjta-properties.xml file in the [appserver root]/server/all/conf/ directory and open the file in an editor.
2. Locate and modify the ‘properties’ element as follows. Add the property (shown in bold) if it doesn’t already exist in the jbossjta-properties.xml file.
<properties depends=”arjuna” name=”jta”>
<property name=”com.arjuna.ats.jta.allowMultipleLastResources” value=”true”/>
<!– … other properties … –>
</properties>
3. Save and close the file.
————-
Nice Jboss Tweak ! :-)
it really works, thanks