2 Replies Latest reply on Jul 29, 2009 3:06 PM by jaikiran pai

    jboss 5 + jtds + xa

    Jason G Newbie

      Hello--

      I am migrating an application from JBoss App Server 4.2.3 to 5.0.1 and have run into a problem with my jTDS datasource (for MS SQL Server) when connecting to multiple databases from the same EJB transaction.

      I have set up the datasources for xa according to the instructions here:
      http://jboss.org/community/docs/DOC-12242

      I am using jtds-1.2.2.jar, which is the latest release of the driver.

      Note these datasources as well as the EJBs were behaving correctly on JBoss 4.2.3.GA.

      Note that the XA datasource works fine for either/both connections when I only open a connection to one datasource (e.g., for beans where I only talk to one database). When I open the second connection, I get the following stack trace:


      16:45:15,038 WARN [logging.loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.xastart] [com.arjuna.ats.internal.jta.transaction.arjunacore.xastart] TransactionImple.enlistResource - xa_start - caught: XAException.XAER_INVAL for < 131075, 28, 27, 4945455110253551014856535810056515158525710053505010050581029945511025355101485653581005651515852571005350501005058494850 >
      16:45:15,038 ERROR [STDERR] javax.transaction.xa.XAException: XAER_INVAL: Invalid arguments were given.
      16:45:15,039 ERROR [STDERR] at net.sourceforge.jtds.jdbc.XASupport.raiseXAException(XASupport.java:677)
      16:45:15,039 ERROR [STDERR] at net.sourceforge.jtds.jdbc.XASupport.xa_start(XASupport.java:198)
      16:45:15,039 ERROR [STDERR] at net.sourceforge.jtds.jdbcx.JtdsXAResource.start(JtdsXAResource.java:105)
      16:45:15,039 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:213)
      16:45:15,039 ERROR [STDERR] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:889)


      This one has me stumped... suggestions? Googling for XAER_INVAL didn't reveal many options...

      As a possible alternative route, the jTDS download has a README.XA, it says that "Many J2EE servers provide their own XA emulations that allow the normal [driver] to be used." Does JBoss 5 support XA Emulation?

      Thanks for any suggestions,
      Jason