2 Replies Latest reply on Oct 18, 2002 10:06 AM by Navdeep

    Sybase and XADatasource

    Navdeep Newbie

      I am trying to migrate an App to Jboss 3.0.3 from Jboss 2.4.3
      we are using Sybase's ASA 7 (SQL Anywhere) Database and I am having trouble creating a XADatasource . I have been able to do that with our Oracle Database's. Has anyone been able to create a sevice.xml that I could use. Also can anyone tell me if JBoss 2.4.3 faked XA distributed transactions if the underlying database did not support it, even if you asked for a XADatasource. And if yes does 3.0.3 also do that?
      I would be grateful for any help.

        • 1. Re: Sybase and XADatasource
          David Jencks Master

          I don't really know, but from the depths of my memory I thought SQLAnywhere was kind of a small featureless db that didn't support xa??

          Both jboss 2.4.x and 3.x support non xa jdbc drivers, although they do it differently. In 2.4.x you used XADataSourceImpl which was a rather horrible hack/wrapper to make a non-xa driver pretend to be xa.

          In 3.x there is a somewhat cleaner way to do this with the LocalTransaction jca support.

          If as I suspect you are looking for non-xa, you should be able to modify one of the examples fairly easily.

          If you don't mind using a non-released jboss version 3.2 has much simpler datasource configuration.

          • 2. Re: Sybase and XADatasource
            Navdeep Newbie

            well that is what I thought of SQL Anywhere, but ASA (Adaptive Server Anywhere ) as it is known now, supports Distributed Transactions and has a lot of stuff and features. Also I have read about the " In 2.4.x you used XADataSourceImpl which was a rather horrible hack/wrapper to make a non-xa driver pretend to be xa." in other listings as well, what does that mean? We had checked whether roll backs were working correctly and they were in Jboss 2.4 against ASA database when we created an XA Datasource. Our transactions normally start in a Session bean method and span across a couple of Entity beans (we use BMP), and when an exception occurs the updates in both Entity beans and Session beans get Rolled back ( we do it by using the InitialContext.setRollbackOnly() to mark the transaction for Rollback). I beleive this is the correct behaviour.

            So in essance my point is that in JBoss 2.4 the Sybase Connections I was making seemed to be working correctly with XA Datasource's I created. But now I get an error while creating a XA Datasource. So I was wondring if anyone had tried that. I think I should be able to hack something if anyone had created a XA Datasource against any tye of Sybase Database in 3.0.3 .
            Another question is how stable is 3.2? Ans is there any hack available in JBoss to upgrade to Jetty 4.1 with JBoss 2.x. Because the reason we are upgrading is due to the fact that we need to upgrade the Jetty version to 4.1 as 4.0 version is unstable.
            Thanks for your patience