Jeanne Boyarsky wrote:Does the caller of this code close the connection when done with it?
Another possibility that your datasource is not sized correctly. Some datasources need the minimum size to zero or they hang on to open connections.
Hi Jeanne,
Thanks for your reply.
The caller code is closing the connection object. I am pretty sure about it. After some research, i have found the same suggestion as you mentioned above(making the minimum size to zero).
I have talked to my DBA and according to him on the database, the connection objects are closed if they are idle for 30 mins. My pool minimum size is 1, hence if there is no requests to the DB for more than 30 mins, that connection object is becoming stale.
Having said that, I am still not able to understand the functionality of refreshCache(), why it is not refreshing the invalid connections.
Any comments on this will be appreciated. thanks