4 Replies Latest reply on Jul 18, 2003 3:14 AM by rbegg

    Does anybody have a working configuration for Oracle 9i + jb

    tom_doehler

      Hi ,

      does anybody have an working jboss configuration that used xa transactions with oracle 9i and jboss 3.2.1 ??
      If so, could someone please post wat is necessary to configure xa transactions.
      I tried the following configuration :


      <xa-datasource>
      <jndi-name>xads</jndi-name>
      <track-connection-by-tx>true</track-connection-by-tx>
      <isSameRM-override-value>false</isSameRM-override-value>
      <managedconnectionfactory-class>org.jboss.resource.adapter.jdbc.xa.oracle.XAOracleManagedConnectionFactory</managedconnectionfactory-class>
      <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
      <xa-datasource-property name="URL">jdbc:oracle:thin:@host:1521:sid</xa-datasource-property>
      <xa-datasource-property name="User">user</xa-datasource-property>
      <xa-datasource-property name="Password">password</xa-datasource-property>
      <min-pool-size>0</min-pool-size>
      <max-pool-size>50</max-pool-size>
      <blocking-timeout-millis>20000</blocking-timeout-millis>
      <idle-timeout-minutes>15</idle-timeout-minutes>
      </xa-datasource>

      With this configuration, we still get the following XA exception:

      XAException: tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=sapphire//221, BranchQual=] errorCode=XAER_PROTO
      at oracle.jdbc.xa.OracleXAResource.disallowLocalTxnMode(OracleXAResource.java:1045)

      There is another posting (http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= describing the same problem. The suggested solution mentioned there is to close any local transactions before closing the connection. I actually don't know how to do that, since I don't care about local or global transactions in application code, and i really don't want to.

      I searched the JBoss bug tracker, but the only bug i found was #590816, showing no solution on this issue.

      So, if anybody has a working configuration with JBoss 3.2.1 and working oracle xa transactions, please provide it here.

      Regards , Tom

        • 1. Re: Does anybody have a working configuration for Oracle 9i

          Well, I have a working config.... sort of!

          So, I am hoping this thread gets noticed as well.

          My problem is that my XA transactions only work on one particular server in the organization, which happens to be installed on my desktop. (although others connect to my machine just fine, so it doesn't appear to be a local vs remote issue)

          As soon as I try to change the datasource XML file, and try to access any other DB, I get the following message:

          15:25:15,015 INFO [TxConnectionManager] Could not enlist in transaction on entering meta-aware object!

          I've tried the thick and the thin drivers, as well as oracle 8.1.6, and 8.1.7, and 8.0.5


          Does anybody have any idea of any Oracle configurations that might need to be done? Or any other advice?



          • 2. Re: Does anybody have a working configuration for Oracle 9i

            I started to make some headway on this, so I wanted to give an update to see if anyone else might be able to run with it.

            Apparently, there is something you need to install with the Oracle Installation, probably some package dealing with Java stuff.

            I found a sql script in oracle\ora81\javavm\install called initxa.sql I ran it as dba and got a little further, now I am getting different error messages from Oracle. I am going to try to figure out the rest today.

            So, if anyone reading this is a DBA, can you please post ideas on how to get Oracle to install Java XA support?

            Thanks.

            • 3. Re: Does anybody have a working configuration for Oracle 9i
              tom_doehler

              You need to install the oracle xa packages, since xa transactions in on oracle side need some java objects etc. to get xa working.

              The problem with oracle + jboss resides in the oracle jdbc drivers, which check if a connection object was used with a local transaction. If this is the case, the local transaction is not commited or rolled back, instead of this an xa exception is thrown.

              A workaround may be either to write some peace of code in jboss that checks on a connection if a local transaction is active, and if so, commit/rollback it, or maybe use an older jdbc driver.

              I actually didn't find a version that works, but I'm still looking.

              Regards, Tom

              • 4. Re: Does anybody have a working configuration for Oracle 9i
                rbegg

                Here's something you can try - it's not a solution but it does point to a problem.

                Whenever you start the server use the jmx-console to clear the connection pool for the XA datasource. You should find that you can use the Oracle datasource now.

                Interesting...