5 Replies Latest reply on Jan 20, 2007 1:33 PM by Weston M. Price

    SET CHAINED MODE

    Venkitachalam Subramanian Newbie

      Can i comfigure sybase-ds.xml so that connection starts in Unchained Mode. Also my db default mode is unchianed, how come then Jboss connection begins it in chained mode


      thanks
      Venki

        • 1. Re: SET CHAINED MODE
          Andrea Delle Chiaie Newbie

          You could add a connection property in you sybase-ds.xml file after the tag:

          <connection-url>jdbc:sybase:Tds:SERVER_IP:SERVER_PORT/DB_NAME</connection-url>

          the tag:
          <connection-property name="SQLINITSTRING">set chained off</connection-property>

          the SQLINITSTRING connection property, quoting the Sybase JConnect 5.5 documentation:
          Use this property to define a set of commands to be passed to the back-end database server. These must be SQL commands that can be executed using the Statement.executeUpdate( ) method.
          

          I've never used the SQLINITSTRING connection property and so I'm not able to tell you more, but it's worth a try.
          Let us know if it's a working solution.
          Ciao


          • 2. Re: SET CHAINED MODE
            Venkitachalam Subramanian Newbie

            Hi,

            Thanks for ur reply.

            I had worked out another method. I modified the new-connection-sql & check-valid-connection-sql tags as follows:


            <new-connection-sql>SET CHAINED OFF</new-connection-sql>
            <check-valid-connection-sql>SET CHAINED OFF</check-valid-connection-sql>

            I believe it should not have any other effects. If any please do reply.


            thanx
            Venki

            • 3. Re: SET CHAINED MODE
              Venkitachalam Subramanian Newbie

              It seems the "new connection sql" does not work. As this error goes only when I refresh the page again i.e. after connection is made in first instance.

              Also,

              <connection-property name="SQLINITSTRING">set chained off</connection-property>

              does not seem to work


              pls. help

              thanx
              Venki

              • 4. Re: SET CHAINED MODE
                Hans Weisheimer Newbie

                I realize this thread is old, but having spent a week myself trying to get around this, I wanted to share.

                I have been doing migration work on an application with about a dozen EJBs. All of the transaction settings are NotSupported, and with a standard local-tx-datasource I was running into chained mode errors. After actually reading the 4.0 app server guide, I noticed the "no-tx-datasource" type. I switched the datasource to this, and everything started working again.

                • 5. Re: SET CHAINED MODE
                  Weston M. Price Master

                  Correct. Using the no-txn-datasource requires that the connection have the autocommit value set to true by default which is required in non chained mode.