This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

IBM 287: AGED_TIMEOUT from Kushner's Book

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howard talks about this setting that if the time limit is surpassed and if the application tries to reuse the connection a StaleConnectionException is thrown. He then provides a solution to trap for these exceptions presumably if you're using straight JDBC in a POJO or BMP, but what if you're using CMP.
You can't very well go a change the generated code (well you could, but that's not very maintainable), and by the time the exception bubbled up, I would think it would be too late as the container has already released the references.
Thoughts?
TIA!
[ December 11, 2003: Message edited by: Luigi Smith ]
 
author
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Luigi,
You are correct on every point. Do you have a specific question?
 
Luigi Smith
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the solution to the AGED_TIMEOUT issue if you're using CMP?
 
Howard Kushner
author
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're having a problem with timeouts, then go with BMP or Session Beans and JDBC.
It's like you said: with CMP it's not your code, so there's really nothing, as a developer, that you can do. Sorry 'bout that partner.
Are you actually working with CMP's that are timing out, or is this more of a theoretical question?
 
Luigi Smith
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For our situation, we set the min connections to 0 to relieve the issue due to non-use overnight, but just wondering if there was anything else I could do. Thanks for your input!
Lou
 
Does this tiny ad smell okay to you?
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!