Thanks a lot for your suggestion. There are simple way to achieve the same result as your have suggested e.g. may be implementing preProcess/init/destroy method of struts RequestProcessor.
However as I have mentioned earlier it is some how *NOT WORKING*.
May be there are some advanced configuration setting needed in DBCP to fix this. ANybody more familiar with DBCP can throw some idea.

Somebody suggested me to use autoReconnect=true in url pattern of DBCP configuration and I also tried that still connections are getting increased in DB server. This is more related to recycling all unused db connection or closing all unused db connections. Something like connection pool should try to get all unused db connections and reuse them before requesting for a fresh db connection to db server, and if there are no unused connections then pool should request for new db connections which is not happening in my case. Each time I redeploy, pool makes a fresh db connection with server.

- R

Conrad CRAMPTON PSE 52704 wrote:
I haven't used the DBCP I must admit and was suggesting something not
actually tied to the re-deployment process specifically but something
that stands by itself as a separate part to your application e.g.
servlet or jsp that you has some method of closing all pooled
connections. if you are using struts have an actionmethod that does this
would be appropriate when called on submission of an (protected) admin
page - eg.
http://yourdomain/context/admin.do?action=closeAllConnections
then you could call the close() method on the ObjectPool interface. Sorry a bit abstract in my explanation, but just an idea. I think to
get the application to know when it is being redeployed is a bit
ambitious and prone to failure. If you know when you are going to
redeploy it then you also know that you need to close the connections
and therefore it is in your control.
Conrad

[EMAIL PROTECTED] 23/05/07 16:43:47 >>>

Do you mean to use any listener to servlet or could you please
elaborate bit more ? I am using struts ActionServlet and I too tried to implement destroy method of RequestProcessor and close all connections on every redeployment. However it is somehow not working and may be I am doing something wrong.

- R

Conrad CRAMPTON PSE 52704 wrote:
can't you create a utility servlet that you can call
pre-redeployment
that closes all of your connections first?
Conrad

[EMAIL PROTECTED] 23/05/07 16:32:06 >>>
Hi Group,
I am using DBCP provided connection pool in my web applications. For

each re-deployment of my web application, connection pools are not reused so connections are just increased. This forces me to restart
my
live application in every month. Is there any way, I can reuse connections in redeploy.
Your help would be appreciated.

regards,
RBAISAK


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]





Reply via email to