3 Replies Latest reply on Apr 27, 2004 4:42 AM by annegret

    How to configure XADataSource for Sybase using DTC

    annegret

      Hello,

      how can I configure XADatasource for Sybase using DTC ?

      I get the excetpion that my server does not support XA-TRansactions:
      2004-04-26 15:09:12,984 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection:
      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: JZ0XS: Der Server unterstützt keine XA-Transaktionen. Prüfen Sie, ob die Transaktionsfunktion für den Server aktiviert und lizenziert ist.)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:145)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:477)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:213)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:496)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:425)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:318)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:477)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
      at com.tenovis.oam.i33.as.coco.JDBCSupport.getCachedConnection(JDBCSupport.java:256)
      at com.tenovis.oam.i33.as.coco.JDBCSupport.getDbConnection(JDBCSupport.java:114)
      at com.tenovis.oam.i33.as.sv.JobServiceImpl.getJobServiceState(JobServiceImpl.java:737)
      at com.tenovis.oam.i33.as.sv.JobServiceImpl.run(JobServiceImpl.java:93)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: java.sql.SQLException: JZ0XS: Der Server unterstützt keine XA-Transaktionen. Prüfen Sie, ob die Transaktionsfunktion für den Server aktiviert und lizenziert ist.
      at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:498)
      at com.sybase.jdbc2.jdbc.SybXAConnection.(SybXAConnection.java:211)
      at com.sybase.jdbc2.jdbc.SybXADataSource.createConnection(SybXADataSource.java:147)
      at com.sybase.jdbc2.jdbc.SybDriver.connect(SybDriver.java:473)
      at com.sybase.jdbc2.jdbc.SybDriver.connect(SybDriver.java:505)
      at com.sybase.jdbc2.jdbc.SybDataSource.getConnection(SybDataSource.java:217)
      at com.sybase.jdbc2.jdbc.SybXADataSource.getXAConnection(SybXADataSource.java:79)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:137)
      ... 13 more


      My xxx-ds.xml configuration is:

      <xa-datasource>
      <jndi-name>HOTi33</jndi-name>

      <xa-datasource-class>com.sybase.jdbc2.jdbc.SybXADataSource</xa-datasource-class>
      <xa-datasource-property name="DatabaseName">mydatabase</xa-datasource-property>
      <xa-datasource-property name="ServerName">localhost</xa-datasource-property>
      <xa-datasource-property name="PortNumber">2638</xa-datasource-property>
      <xa-datasource-property name="User">xxx</xa-datasource-property>
      <xa-datasource-property name="Password">yyy</xa-datasource-property>

      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>

      <!-- The time before an unused connection is destroyed -->
      <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
      <idle-timeout-minutes>900000</idle-timeout-minutes>

      <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>

      <!-- Whether to check all statements are closed when the connection is returned to the pool,
      this is a debugging feature that should be turned off in production -->
      <track-statements>true</track-statements>
      <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
      <min-pool-size>1</min-pool-size>
      <!-- The maximum connections in a pool/sub-pool -->
      <max-pool-size>32000</max-pool-size>
      </xa-datasource>


      Sybase supports XATransactions using Distributed Transaction Coordinator (DTC).
      How can I configure jboss to use DTC ?

      Annegret

        • 1. Re: How to configure XADataSource for Sybase using DTC

          You limit the number of people that can respond if you post error messages in German.

          From my limited German I'd guess it says:
          "The server does not support XA Transactions"?

          If you have problems configuring Sybase, I'd suggest you use a Sybase forum
          rather than a JBoss forum.

          • 2. Re: How to configure XADataSource for Sybase using DTC
            dannyyates

             

            I get the excetpion that my server does not support XA-TRansactions


            That's because your server does not support XA Transactions.

            Sybase's XA support is a chargable option.

            Typing JZ0XS into Google produces two hits. The first one looks particularly helpful.


            • 3. Re: How to configure XADataSource for Sybase using DTC
              annegret

              Thanks so far.

              I found out that the Sybase Adaptive Server Anywhere 9.0 (which we use) itself does not support XATransactions but may take part in distributed transactions if the applicationserver is configured to use Distributed Transaction Coordinator.
              E.g. it is possible to configure the Sybase Enterprise ApplicationServer to use DTC.

              Is it possible to configure jboss 3.2.3 to use DTC ?

              Only Sybase Adaptive Server Enterprise may be confiugred itself to use DTC.

              Annegret