4 Replies Latest reply: Nov 28, 2012 10:33 AM by 746690 RSS

    JDBC datasource

    becks
      Hi,

      I'm using weblogic 8.1. I have this jdbc datasoure and persistance file store for JMS. Once my application server weblogic lost network connection to the database server for 10 mintues, after which the connection is back. But the jdbc connection is not back, any idea how can i set to have the connection back once the network is alive again.
        • 1. Re: JDBC datasource
          Pierluigi Vernetto
          enable "test connection on reserve", that should guarantee you that all "bad" connections are removed from the pool
          • 2. Re: JDBC datasource
            746690
            Enable "Test Connections On Reserve" for your pool


            Test Connections on Reserve

            This option will be enables WebLogic Server to test a connection before giving it to a client application. Test connection done by WebLogic using SQL statement based on value of Test Table Name. This connection test adds a small delay in serving the client’s request for a connection from the pool, but ensures that the client receives a reliable connection.

            Test Frequency

            Test Frequency is time interval in seconds WebLogic Server tests unused connections. Connections that fail the test are closed, re-establish a valid physical connection to database, and test the new connection before returning it to the pool. If the test fails again, the connection is closed. If value set to 0, periodic testing is disabled.

            Test Table Name

            Test table name is config for SQL Statement which used when testing physical database connections. This value is required when Test Frequency value more than 0 and Test Reserved Connections is enable. The SQL code used to test a connection is depends on database provider. Best practice for this value is fastest SQL statement to the database. Example in ORACLE database, SQL SELECT 1 FROM DUAL is super-fast SQL statement which can be used in this option. Test Table Name must begin with string “SQL “, and then followed by SQL statement.


            Regards
            Mukesh Negi
            http://weblogicserveradministration.blogspot.com
            • 3. Re: JDBC datasource
              becks
              how about the file store of jms server?
              I was thinking to change it to locally. But if over a network, is there a way to re-estabilse the connection when the network is back again.
              For mine, my application just hang at the weblogic error message saying the network name is not available.
              • 4. Re: JDBC datasource
                746690
                you can just undeploy and deploy ( untarget and target ) the connection pool again.

                Regards
                Mukesh Negi
                http://weblogicserveradministration.blogspot.com