9 Replies Latest reply on Nov 19, 2003 6:48 AM by Sebastian Löfhjelm

    Oracle and XA

    Frank Behner Newbie


      we having problems using JBoss 2.4.3 in a production like environment, where we have concurrent applications accessing the same Oracle DB. We are using the JDBC 9.0.1 driver from Oracle and oracle.xa.client.DataSource and also the XID from Oracle. If we try to get a connection to the DB we receive a IllegalArgument exception saying that we are unable to register to the transactionmanager with arguments null xaref.
      My question is, has anybody used JBoss succesfully with a real XA mode and Oracle? Could he post his configuration? Or does anybody can hint us were we have misconfigured?
      Thanks Frank

        • 1. Re: Oracle and XA
          marc fleury Master

          Yes people have use the XA driver succesfully with JBoss, frankly I am no expert in Oracle configuration so I can't tell you, did you check the documentation? You might also want to cross-post to the database forum, good luck.


          • 2. Re: Oracle and XA
            Joel Cordonnier Newbie

            Hi ,

            I'm using JBoss-2.4.3 and Oracle 8.1.6: I have a small JUnit client to test if transaction a really working with Oracle.

            I have the following problem: after a couple of insert/update, my client hang (problem on a remove statement). I have tried to use an Oracle 8.1.7 Thin (pure Java) driver...with the same result.

            Any idea ?


            • 3. Oracle and XA, AND Transaction timeout
              Joel Cordonnier Newbie

              (see my previous post: problem with JBoss-2.4.3 and Oracle 8.1.6).

              After a couple a minutes (timeout), i have the following message:

              [ftp/FtpBean] Transaction XidImpl [FormatId=257, GlobalId=miami//5, BranchQual=] timed out. status=STATUS_ACTI
              [ftp/FtpBean] Transaction XidImpl [FormatId=257, GlobalId=miami//7, BranchQual=] timed out. status=STATUS_ACTI
              [BeanLock] Thread[RMI TCP Connection(10)-,5,RMI Runtime]Saw rolled back tx=TransactionImpl:XidImpl
              [FormatId=257, GlobalId=miami//7, BranchQual=] waiting for txLock
              [ftp/FtpBean] TRANSACTION ROLLBACK EXCEPTION:Transaction marked for rollback, possibly a timeout; nested excep
              tion is:
              java.lang.RuntimeException: Transaction marked for rollback, possibly a timeout
              [ftp/FtpBean] java.lang.RuntimeException: Transaction marked for rollback, possibly a timeout
              [ftp/FtpBean] at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.waitForTx(QueuedPessimisticEJBLock.java
              [ftp/FtpBean] at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.doSchedule(QueuedPessimisticEJBLock.jav
              [ftp/FtpBean] at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.schedule(QueuedPessimisticEJBLock.java:
              [ftp/FtpBean] at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:132)
              [ftp/FtpBean] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
              [ftp/FtpBean] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:307)
              [ftp/FtpBean] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
              [ftp/FtpBean] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)
              [ftp/FtpBean] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
              [ftp/FtpBean] at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:427)
              [ftp/FtpBean] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:395
              [ftp/FtpBean] at java.lang.reflect.Method.invoke(Native Method)
              [ftp/FtpBean] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
              [ftp/FtpBean] at sun.rmi.transport.Transport$1.run(Transport.java:142)
              [ftp/FtpBean] at java.security.AccessController.doPrivileged(Native Method)
              [ftp/FtpBean] at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
              [ftp/FtpBean] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
              [ftp/FtpBean] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:643)
              [ftp/FtpBean] at java.lang.Thread.run(Thread.java:484)

              Any idea ?

              • 4. Re: Oracle and XA
                Joel Cordonnier Newbie

                Does this problem have a relation with the transaction 'commit option' ?? (a, b c or d)


                • 5. Re: Oracle and XA
                  Chuck Heinle Newbie


                  I had similar problems using Weblogic and found that it was a bug in the Oracle 8.1.6 JDBC driver. Intermittent hanging had something to do (I was told) with Oracle's MTS(Multi Threaded Server) and the JDBC driver.

                  I changed JDBC drivers and it corrected the problem.

                  • 6. Re: Oracle and XA
                    Joel Cordonnier Newbie

                    And what do you use for a Oracle JDBC driver ? 8.1.7 ?


                    • 7. Re: Oracle and XA
                      Chuck Heinle Newbie

                      Sorry, I wasn't very detailed in my last response.

                      At the time, we changed to the Weblogic JDriver. It solved the problem...of course we were using Weblogic 6.0.

                      I have been using JBoss for short time, and we ended up using the Oracle OCI JDBC 8.1.7 (also tried 9.0.1)...both seemed to work without the intermittent hanging. It seemed to be isolated to the thin driver in our case.

                      Our DB Engineer also suggested changing our connection type (in TNSNAMES.ora) to be DEDICATED which he believed would eliminate the use of Oracle's MTS. Since we were using the OCI driver now rather then the thin, I did this....

                      I hope this helps.

                      • 8. Re: Oracle and XA
                        David Jencks Master

                        BTW, I am hoping someone will contribute a configuration for jboss 3 and an Oracle xa driver (using the xa jca wrapper). AFAIK this wrapper is essentially untested so user experience would be very useful.

                        If anyone is interested in working on this I can come up with a suggestion for a oracle-xa-service.xml file to experiment with. (email me at d_jencks@users.sourceforge.net, I may not see a forum post)

                        • 9. Re: Oracle and XA
                          Sebastian Löfhjelm Newbie

                          The solutions provided seems to be experimentals .... and simply doesn't work.... ref : oracle-ds.xml 1.5