7 Replies Latest reply on Mar 21, 2013 12:20 AM by zhfeng

    Not possible to have some XA and some Non-XA servers?

    crisb

      In our application we have a mixture of non-xa and XA servers, depending on the task.  Sometimes it's useful to have more control over the database connection or have multiple connections which are temporary.

       

      Unfortunately it seems that in blacktie all servers call tx_open implicitly, which restricts them for XA use only, as for example if informix detects it is running in the XA environment it restricts the types of commands that can be run.

       

      Is it possible to define a non-XA server somehow?

        • 1. Re: Not possible to have some XA and some Non-XA servers?
          zhfeng

           

          Unfortunately it seems that in blacktie all servers call tx_open implicitly, which restricts them for XA use only, as for example if informix detects it is running in the XA environment it restricts the types of commands that can be run.

           

          Is it possible to define a non-XA server somehow?

          I've checked xatmi/src/main/cpp/AtmiBrokerServer.cxx and it calls tx_open in the constructor function. I'm discussing with Tom to see if we can define a non-XA server.

           

          Thanks,

          Amos

          • 2. Re: Not possible to have some XA and some Non-XA servers?
            mmusgrov

            Why don't you just open a connection to the non XA database manually in the same way that any other non-XATMI application would do?

            • 3. Re: Not possible to have some XA and some Non-XA servers?
              crisb

              at least in the case of informix, this is not allowed as I get an error:

               

              -701Statement is invalid within the XA environment.

               

              This error is generated when you attempt to execute any of the

              following statements within an X/Open distributed

              transaction-processing environment:

               

              *   CLOSE DATABASE

               

              *   CREATE DATABASE

               

              *   DROP DATABASE

               

              *   SET LOG

               

              *   SAVEPOINT

               

              *   RELEASE SAVEPOINT

               

              *   ROLLBACK TO SAVEPOINT

               

              Within this environment, you can execute a single DATABASE statement

              after an xa_open call to specify a current database. However, after

              this database is selected, no other DATABASE statement can be executed.

              This error is generated when you attempt to execute a second DATABASE

              statement.

               

               

              I did also think of perhaps setting BLACKTIE_CONFIGURATION differently for different servers (ie if unset for example it wont open any XA resources).  For example we also have MQ as an XA datasource, but only need access to it from one server.

              • 4. Re: Not possible to have some XA and some Non-XA servers?
                mmusgrov

                We don't support informix. The databases that we do support (DB2 and Oracle) may impose less restrictions on using them in an XA environment making it easier to port your existing applications. Have you tried your non XA aware code on one of these two databases. Do you know if other XATMI implementations support non XA-aware servers

                • 5. Re: Not possible to have some XA and some Non-XA servers?
                  crisb

                  I thought the XA support should support whatever XA datasources are available?

                   

                  Our existing application (which we are porting from Tuxedo) runs on Informix and Oracle.  This is exactly the situation we have there, the servers are not XA aware until the tx_open is called, and this must be done from the bespoke server init code.

                  • 6. Re: Not possible to have some XA and some Non-XA servers?
                    mmusgrov

                    I thought the XA support should support whatever XA datasources are available?

                     

                    We have found that a number of databases that purport to be XA capable do not in fact fully support XA rendering them incompatible for use in an XATMI environment.

                     

                    However, instead of saying "we don't support" I should have said, of the databases we have tested against, we have only found DB2 and Oracle to be compatible. We have not tested informix, so OK if that is what you are using then we will look into supporting your requirement.

                    • 7. Re: Not possible to have some XA and some Non-XA servers?
                      zhfeng

                      can you raise a JIRA and I can look into ?

                       

                      Thanks,

                      Amos