This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi all, I am using dynamic connection pool mechanism in my application with Oracle Database server as back end. The initial number of connection is 15. But when the oracle Database server goes down, logically we cannot use those objects, so the application gives error message. But what will happen if the database sever is restarted and the appserver is not restarted and it is running. Whether can those 15 connections can be automatically created or available for any database queries. What i have observed in my application is that the database connection are lost and to recreate it, we have to restart the application server. Why is it so? I got the feeling that something is wrong in the dynamic connection pool mechanism. Because in this case, appserver layer is depended on the database layer which is not advisable. Please let me know your views. Thanks & Regards, M.S.Raman
There is a "refresh period "attribute which is associated with a connection pool. Use this in conjunction with a test table .Connections that do not pass the test will be closed and reopened in an attempt to reestablish a valid physical database connection .
Joined: Nov 07, 2001
Thanks Satish. But I am not clearly understand your point. Can you please elaborate it. Thanks & Regards, M.S.Raman
- Go to Administrative console - Select Services -> JDBC -> Connection Pools -> Your pool on the left side of the frame. On your right side, you will see the details of your pool. - Select the tab "Connections" and change the refresh period to say 1 min. Now weblogic will try to refresh the pool every 1 min. - Select the "Testing" tab and enter the test table name "some table in your database" Now the pool will be refreshed when the database comes up after it goes down.