4 Replies Latest reply on Mar 21, 2013 10:06 AM by pastore23

    Non EJB JTA possible?


      I am building a web service that will need to access 3 databases.
      Therefore, I need to use JTA to manage the transaction.

      I am trying to apply JTA without using EJB, Is that possible?

      My code is like this:

      UserTransaction userTransaction = (UserTransaction)inititalContext.lookup("java:comp/UserTransaction");





      catch(Exception ex)

      Exception was encountered with at the userTransaction.commit() line, and the exception message is:

      Caused by: javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the GlobalTransactionsProtocol attribute to LoggingLastResource (recommended) or EmulateTwoPhaseCommit for the Data Source = myDS

      I have tried to change the transaction setting to EmulateTwoPhaseCommit, the same error happens after the restart.
      When I try to change it to LoggingLastResource, WebLogic cannot start at all.

      How can I do and is there anything I have done wrongly?

      Thanks in advance.