5 Replies Latest reply on Mar 21, 2007 6:27 AM by weston.price

    Stale Connection Support

    subramaniam.venkat

      Hello,

      I am using JBoss-4.0.3-SP1. I am using oracle thin driver to connect to my oracle database. My oracle database is running on a cluster enviroment and therefore when there is a ip failover the oracle also switches nodes.

      When connecting to the oracle database i am using the Cluster IP address and there is a listerner which connects to the oracle on the node which is active.

      But during this when there is node switch then the tcp connections are broken.

      When i am trying get a database connection using my datasource i am always getting an error that the oracle is not responding but actually it has switched nodes.

      I would like to know whether the concept of stale connection is supported in JBoss-4.0.3-sp1 if so what should i being doing to use that functionality.

      Any help is very welcome.

      Thanks in advance
      Subramaniam V

        • 1. Re: Stale Connection Support
          subramaniam.venkat

          Hello All,

          I have posted the query in wrong forum.Please let me know..
          I am badly need of some help.

          Thanks & Warm Regards,
          SubramaniamV

          • 2. Re: Stale Connection Support
            weston.price

            Moving to the JCA forum as this has nothing to do with JBossTS.

            • 3. Re: Stale Connection Support
              weston.price

              Please post your *-ds.xml file. It sounds like you need a validation element to discard connections that have become state during the switch.

              • 4. Re: Stale Connection Support
                subramaniam.venkat

                Hello Weston,

                Please find the datasource xml file which we are using.
                I deploy the datasource inside the deploy directory.



                <datasources>
                 <local-tx-datasource>
                 <jndi-name>jdbc/oracleDS</jndi-name>
                 <connection-url>jdbc:oracle:thin:@//ipaddress:port/SID</connection-url>
                 <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
                 <user-name>scott</user-name>
                 <password>tiger</password>
                 </local-tx-datasource>
                </datasources>
                



                Please let me know what should be changed.

                THanks & Warm Regards,
                Subramaniam V

                • 5. Re: Stale Connection Support
                  weston.price

                  Yep, I thought so :-)

                  To get 'stale connection' like behavior you want to add one of the following to your *-ds.xml file:

                  <check-valid-connection-sql>
                  <valid-connection-checker-class-name>
                  


                  Please read the FAQ for the particulars on these settings. There is a lot of other useful information in there as well :-)

                  FAQ
                  http://wiki.jboss.org/wiki/Wiki.jsp?page=FAQJBossJCA

                  Also see:
                  http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigDataSources
                  http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossJCAPooling
                  Also see