• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Connection pool and restart database problem

 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic