Weblogic Connection Pool

Discussions

EJB programming & troubleshooting: Weblogic Connection Pool

  1. Weblogic Connection Pool (7 messages)

    We are running a weblogic server 4.5.1 which talks to a number of database servers on different platforms. Once a week one of the database server and weblogic server is bought down for maintenance at around the same time but the
    restart takes place at different time.
    1. When weblogic server boots up it happens that the database server is still down.What is the best possible
    way(s) to create the connection pool to connect to the
    database server when it boots up.
    Thanks
    Murali

    Threaded Messages (7)

  2. Weblogic Connection Pool[ Go to top ]

    You can write a weblogic startup class for this.
  3. Weblogic Connection Pool[ Go to top ]

    Mettu,

    I wonder how a startup class can tell the container when to test for connections ??
    Can you please explain?

    Bhavesh Bhammar
  4. Weblogic Connection Pool[ Go to top ]

    Bhavesh,

      As you know in BEA Weblogic you can create pool from your code. So write a startup class which continuosly checks if the database is up and then create pool.
     You can get more details on how to create pools from:

      http://www.weblogic.com/docs51/classdocs/conn_pools.html

    -- Mettu.
  5. Weblogic Connection Pool[ Go to top ]

    Hi Murali,
    You can set the refreshTestMinutes in the connectionpool, which would automatically test for connection at the specified interval.
    Lile this:
    weblogic.jdbc.connectionPool.VirtualName=\ refreshTestMinutes=interval for connection test,\
    Bhavesh Bhammar
     
  6. Weblogic Connection Pool[ Go to top ]

    You can set the refreshTestMinutes in the connectionpool, which would automatically test for connection at the specified interval



    I Assumed this can be used once pool is created. Are you sure? Have you tested this?

    Regards,
    Mettu.
  7. Weblogic Connection Pool[ Go to top ]


    I have tested this only for a case when an a connection from the pool was lost because the database went down and was re-established by weblogic based on the refresh interval specified.
  8. Weblogic Connection Pool[ Go to top ]

    You can also set it up so it will check the Connections before leasing them to the client, or when they are being returned back to the pool.

    It checks connections by executing SELECT COUNT(*) FROM table name you specify - dual in Oracle's case.