2 Replies Latest reply on Dec 31, 2003 2:30 PM by sysuser1

    XA Resource Question

    sysuser1

      Hello

      I have written a Resource Adapter, where I don't want to use XA Transactions. So my ManagedConnection has

      public XAResource getXAResource() throws ResourceException
      {
      throw new NotSupportedException("XAResource Transaction not supported");
      }

      and my -ds.xml has

      <!-- Bunch of Connection tags are here -->
      <transaction-support>NoTransaction</transaction-support>
      <reauthentication-support>false</reauthentication-support>


      I deployed this in JBoss 3.2.3. When I ask for connection like

      Object o = jndiContext.lookup("java:/MyConnector");
      MyConnectionFactory myCF = (MyConnectionFactory) o;
      myConnection = (MyConnection) myCF.getConnection(myCRI);

      jboss throws exception for getXAResource

      javax.resource.NotSupportedException: XAResource Transaction not supported
      at test.MyManagedConnection.getXAResource(MyManagedConnection.java:347) at org.jboss.resource.connectionmanager.TxConnectionManager.registerConnectionEventListener(TxConnectionManager.java:393) at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:417)

      How can I config my RA so that getXAResource is not called?

      Thanks in advance

      VM

        • 1. Re: XA Resource Question
          sysuser1

          In my post above I mentioned few lines of -ds.xml. They are actually in ra.xml. My -ds.xml has

          <xa-transaction/>

          as I don't know how to specify **not to use XA transaction**

          Please let me know how can I specify not to use XA Transaction

          Thanks again

          VM

          • 2. Re: XA Resource Question
            sysuser1



            I found what was wrong..

            I had to use <no-tx-connection-factory> instead of <tx-connection-factory>

            Thanks

            VM