0 Replies Latest reply on Feb 7, 2009 3:56 AM by Venu Kemthur

    Could not enlist transaction...

    Venu Kemthur Newbie

      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