1 Reply Latest reply on Mar 22, 2004 10:40 PM by bstains

    XADataSource

    daniel-

      hi,

      i m trying to configure a XADataSource. When using the one from JBoss i got an exception when it s trying to enlist the resource. So i decide to do my own connection using OracleXADataSource, just to try it. there is no problem using it, but only when a change is done in the database (insert, ...) and when i try to commit the transaction i got an exception. eventhough when using rollback for the transaction it s normally working.

      the exception i got when commiting :

      [java] org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=daniel//1, BranchQual=] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.transaction.xa.XAException)
      [java] at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:413)
      [java] at Plugin.PluginHello.doPlugin(Unknown Source)
      [java] at Framework.Thread.Launcher.run(Unknown Source)
      [java] Caused by: javax.transaction.xa.XAException
      [java] at oracle.jdbc.xa.OracleXAResource.disallowLocalTxnMode(OracleXAResource.java:1045)
      [java] at oracle.jdbc.xa.OracleXAResource.suspendStacked(OracleXAResource.java:227)
      [java] at oracle.jdbc.xa.client.OracleXAResource.rollback(OracleXAResource.java:920)
      [java] at org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1664)
      [java] at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:403)
      [java] ... 2 more

      i suppose there is a problem with the XID from oracle and JBoss, but the pad attribute is set at true when i look for it with the JMX console, is there something wrong ????

        • 1. Re: XADataSource
          bstains

          Do a search on the forums for XADataSource. There are a number of threads here with that information. I had a similar issue when I was trying to utilize regular JDBC calls on a local database. Since XADataSource is for transactions across distributed databases, make sure that's what you want to do. If not, you'll need to model the configuration file found at docs/examples/jca/oracle-ds.xml instead of oracle-xa-ds.xml.

          Likewise, you will probably need to post some code for others to help you.

          Hope that helps.