Wednesday, September 12, 2007

Could not enlist in transaction on entering meta-aware object!

This errormessage provided by the Jboss j2ee server gave me a major headance. In a project we are using 2 datasources:

  • an oracle datasource being used by iBatis DAO layer
  • a postgresql datasource being used by JPA DAO layer
After invoking both DAO layers I got this nice SystemException by the JTA transactionmanager.

Investigation showed me ( a few hours later ) that the oracle datasource is not XA by default. You have to configure it to use the XADataSource. You can find a example in the jboss distribution in docs/examples/jca/oracle-xa-ds.xml