11 Replies Latest reply on Oct 19, 2003 5:58 PM by marcwimmer

    jboss 3 and mssql with opta2000 and XA?

    drcharris

      Anybody got a working configuration of an XA setup of jboss 3 with mssql 2000 and the inet opta2000 driver, using the DTCDataSource?

      I can get it working for simple connections, but whenever two connections get created with the same transaction (very frequent when doing entity finds) the second one hangs - sql server shows it as being blocked by process id -2 which doesn't exist.

      c

        • 1. Re: jboss 3 and mssql with opta2000 and XA?
          davidjencks

          Can you do an experiment with their driver and see if, from one XADataSource instance, and 2 XAConnections, the XAResources think they are the same ResourceManager?

          xares1.isSameRM(xares2) =???

          thanks

          • 2. Re: jboss 3 and mssql with opta2000 and XA?
            thpopes

            This sounds like a bug in the Opta2000 dll (sqlserver actually). I was dealing with this issue earlier this year. Contact inetsoftware to get the upgrade.

            • 3. Re: jboss 3 and mssql with opta2000 and XA?
              drcharris

              No, I'm using the most recent version (4.18). Or do you mean the xp_xaprx.dll version? That is 4, 0, 18, 0.

              I'm also getting errors "Could not enlist in transaction on entering meta-aware object" - any ideas?

              I will see what I can find out regarding xares equality. It started to work a few weeks ago but I'm not quite sure why (the worst kind of fix!)

              c

              • 4. Re: jboss 3 and mssql with opta2000 and XA?
                davidjencks

                You can probably fix this by using 3.2 and the TrackConnectionByTx attribute set to true. Then only one connection will every be used for each transaction.

                • 5. Re: jboss 3 and mssql with opta2000 and XA?

                  I have this combo working. I have attached the service XML file

                  Hope this helps

                  • 6. Re: jboss 3 and mssql with opta2000 and XA?
                    drcharris

                    David - yes, I'm now using the TrackConnectionByTx attribute and things are much improved. I'm experiencing many fewer errors which may be simply problem with our application's tx structure - I'm still looking into it.

                    jmoring - thanks for your file, it verifies (along with one from inetsoftware) that I've got things set up correctly. But, I'm trying to use the DTCDataSource which talks to the MS DTC and seems to be a lot fussier. I'll try with XDataSource this week.

                    Thanks both for your help - if I get a fully working DTCDataSource configuration working I'll post it.

                    • 7. Re: jboss 3 and mssql with opta2000 and XA?
                      drcharris

                      ...and, once I added TrackConnectionByTx to jms-service.xml everything works fine! My EJBs were publishing messages in the same tx but the connection manager wasn't talking the same Xid so I was getting XAER_OUTSIDE errors.

                      Problem solved. Thanks for all your help. As promised, opta2000 configuration is attached (as long as Jive can handle it)

                      • 8. Re: jboss 3 and mssql with opta2000 and XA?
                        bratt

                        Hi David,

                        What about configuring jboss-3.0.2 with xa and Microsoft's sql server 2000 driver for JDBC. I had a hard time with it. I got the following error:

                        Unable to get Connection: javax.resource.ResourceException: Unable to create DB
                        XAConnection: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]
                        [SQLServer]Could not find stored procedure 'master..xp_jdbc_open'.

                        Is jboss-3.2 and above my only hope to get this fixed?

                        Thanks.

                        • 9. Re: jboss 3 and mssql with opta2000 and XA?
                          davidjencks

                          I don't know. What does ms documentation say about the error? Some drivers/dbs require you to install various packages to use xa.

                          • 10. Re: jboss 3 and mssql with opta2000 and XA?
                            bratt

                            Hi David,

                            Thanks for the note. I have switched to jboss-3.2beta and continue testing integation with xa ms jdbc driver. After I make modification to the example jca configuration files, when I tried to insert a record into the sql server datbase I got the following error:

                            Unable to get Connection: javax.resource.ResourceException: Could not enlist in transaction on entering meta-aware object!javax.transaction.SystemException: Could not enlist XAResource!javax.transaction.RollbackException: Already marked for rollback

                            If I added the TrackConnectionByTx attr to the config, it would throw me:

                            Unable to get Connection: javax.resource.ResourceException: Unable to get XAResource: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Pooled connection reclaimation not supported.

                            BTW, I am using container-managed transaction demarcation from the EJB container. Are there any other configuration I need to do to get the transaction management from the jboss to the sql server to work properly? I would greatly appreciate any suggestions to get around this.

                            Thanks again,
                            Bratt

                            • 11. Re: jboss 3 and mssql with opta2000 and XA?
                              marcwimmer

                              There is a slight mistake in the file "mssql-opta-xa-service.xml", which leads into frustration for beginners:

                              The depending attribute "ManagedConnectionFactoryName" has to be under the JBossManagedConnectionPool bean.

                              Thanx for this script by now!