EJB programming & troubleshooting: Weblogic Connection Pool
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
- Posted by: Namakkal Krishnan
- Posted on: August 01 2000 16:57 EDT
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.
- Weblogic Connection Pool by Kumar Mettu on August 02 2000 02:51 EDT
- Weblogic Connection Pool by bhavesh bhammar on August 02 2000 11:12 EDT
You can write a weblogic startup class for this.
I wonder how a startup class can tell the container when to test for connections ??
Can you please explain?
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:
You can set the refreshTestMinutes in the connectionpool, which would automatically test for connection at the specified interval.
weblogic.jdbc.connectionPool.VirtualName=\ refreshTestMinutes=interval for connection test,\
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?
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.
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.