• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection pool and restart database problem

 
Jun Hong
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I have a Java application which maintains a connection pool to Oracle database through Oracle thin driver. If somebody restart Oracle database, the connection pool is no longer valid. What can I do when somebody restart database?
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which connection pool & application server are you using? I remember somebody talking about this a while back and they put some code in their connection pool to check the connections were valid before handing them out.
 
Jun Hong
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
Thank you for your message. I am using the connection pool from oracle thin driver. Now I start to think that the connection pool which is maintained by datasource can take care of itself. If database restarts, connection pool refresh itself. (This means some code is check the pool constantly with some time intervals. Perhaps, the connection pool will be refreshed when an staled connection Exception is thrown)
Several months ago, I was using WebSphere 4.0 and the connection pool is provided by WebSphere. Behind the sceen, it is just a Oracle thin driver connection pool. Since that one was fine in the weekends. My new pool should be fine.
However, I am still not sure. My current application throw broken pipe SQLException on a Sunday. I am suspicious that people restarted Oracle server when that happens. Last weekend, it did not happen again.
The stuff you mentioned is more related to the implementation of connection pool. How to check whether it is valid. I guess.
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What classes do you use to implement the connection pool with the oracle thin client driver?

Did it happen this weekend?
Adam
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic