6 Replies Latest reply on Jul 27, 2002 1:15 AM by garyg

    what exactly is an XADataSource

    garyg

      I'm chasing some XAException warnings and errors of errorCode=XAER_RMERR (see below for output).

      Anyways, I'm told by someone off the com.databases.postgresql.interfaces.jdbc site that the reason I'm seeing this is probably because Im using distributed transactions (which the XA refers to) and neither the postgresql or jdbc driver support distributed connections (yet that's how my jboss.jcml is config'd, *I think*).

      And this is my question ... I configured the jboss.jcml as an XADataSource and is if this were a normal thing. So like, what am I not understanding here.

      Anyhelp much appreciated.

      --- output
      [WARN,TxCapsule] XAException: tx=XidImpl [FormatId=257, GlobalId=cassia//184, BranchQual=] errorCode=XAER_RMERR
      javax.transaction.xa.XAException
      at org.jboss.mq.SpyXAResource.commit(SpyXAResource.java:102)
      at org.jboss.tm.TxCapsule.commitResources(TxCapsule.java:1490)
      at org.jboss.tm.TxCapsule.commit(TxCapsule.java:324)
      at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:314)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:565)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:376)
      at org.jboss.mq.SpySession.run(SpySession.java:248)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:172)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:725)

      --- jboss.jcml


      <mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">
      <attribute name="Drivers">org.postgresql.Driver</attribute>
      </mbean>

      <mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=PostgresqlDB">
      <attribute name="PoolName">PostgresqlDB</attribute>
      <attribute name="DataSourceClass">org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl</attribute>
      <attribute name="Properties"></attribute>
      <attribute name="URL">jdbc:postgresql:acais://localhost:5432</attribute>
      <attribute name="GCMinIdleTime">1200000</attribute>
      <attribute name="JDBCUser">mypasswd</attribute>
      <attribute name="MaxSize">10</attribute>
      <attribute name="Password">mypasswd</attribute>
      <attribute name="GCEnabled">false</attribute>
      <attribute name="InvalidateOnError">false</attribute>
      <attribute name="TimestampUsed">false</attribute>
      <attribute name="Blocking">true</attribute>
      <attribute name="GCInterval">120000</attribute>
      <attribute name="IdleTimeout">1800000</attribute>
      <attribute name="IdleTimeoutEnabled">false</attribute>
      <attribute name="LoggingEnabled">false</attribute>
      <attribute name="MaxIdleTimeoutPercent">1.0</attribute>
      <attribute name="MinSize">0</attribute>
      </mbean>


      Any help much appreciated.

        • 1. Re: what exactly is an XADataSource
          davidjencks

          The jboss XADataSourceImpl is a hack to make a non-xa driver look like an xa capable driver, while not actually implementing 2pc or other xa goodies. So your problem lies elsewhere. Personally I find this section of the 2.4 code 100% impenetrable. If you can't solve your problem you might try a jboss 3 version which has what I regard as a somewhat less convoluted implementation of this functionality.

          • 2. Re: what exactly is an XADataSource
            jlmartinez

            I'm not sure that Postgres driver supports XA, I was using an XA configuration in JBoss 2.4.4 (jboss.jcml file). But really I have a problem when I sent massive querys, I posted the problem in :

            http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ I'm going to test the version JBoss-3.0.1RC1, according to response of Dain Sundstrom.

            Thank you for your help.

            Jose Luis Martinez
            Sorry for my poor english.

            • 3. Re: what exactly is an XADataSource
              garyg

              I'm wondering if we have the same problem. I am using an XA configuration in the JBoss 2.4.4 (jboss.jcml) for postgres and am very interested to know what your results are.

              I looked at that link and hope you can keep us informed for what release, if any that might fix this.

              • 4. Re: what exactly is an XADataSource
                anil105

                Hi,
                M chasing XA Datasource bugs too!
                Has anyone come across this...
                18:44:05,850 INFO [XATxConnectionManager$XAConnectionEventListener] throwable from unregister connection
                java.lang.NullPointerException

                Although its an INFO, whats it??.Bcoz after I get this I cannot proceed.The null pointer is thrown during execution of a findByPrimaryKey call of an CMP.
                Any ideas what it is?
                Thanks,
                Anil

                • 5. Re: what exactly is an XADataSource
                  jlmartinez

                  Definitively the postgres Driver don't supports XA Datasources.

                  I'm testing JBoss-3.0.1RC1, but I have problems fixing -D properties in JAVA_OPTS.

                  http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/

                  • 6. Re: what exactly is an XADataSource
                    garyg

                    So seeing that most all feedback is that the Postgres driver is not XA capable, how do I fix this, or these errors?

                    Do I need to find another driver that is XA capable? Or configure it differently?

                    Any ideas much appreciated.