[jboss-user] [EJB/JBoss] - Could not enlist transaction...

venukb do-not-reply at jboss.com
Sat Feb 7 03:56:06 EST 2009


Setup:
MySQL 5.0.46 enterprise with Mysql connector 5.1.7
Jboss- 4.2.3 GA

The are 2 Databases configured-JBossDB and AppDB. The *-ds.xml files have been configured to bind DefaultDS to Jboss DB and AppDS JNDI to AppDB

Both  use <local-tx-datasource>

In a method call, 2 functions are being invoked
1. One function uses injected Entity manager (CMP) and calls em.persist and returns.
2. The other method uses EJB TimerService to create a timer - which in turn tries to create an entry in JBossDB

While doing this, its throwing the following exception stack:
EJBException -> IllegalStateException -> NestedSqlException -> Could not enlist in transaction on entering post-aware object

I am new to EJB world and the JTA world.
Is the above error because of a single transaction updating 2 different databases? 

Will using xa-datasource help in resolving this issue?

thanks in advance
Venu



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

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



More information about the jboss-user mailing list