• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Logging Database Connectivity Errors

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

In case there is a database failure in CMP entity bean, or the database is down for sometime and a transaction is made by a user, then it should log that the database was down for some �X� reason in a flat file. But in CMP there is a problem that it always abstracts the Database failure issues. Suppose a transaction is made, then the session bean tries to call the finder methods or create method on entity bean � Which simply in CMP throw a FinderException or CreateException and not the SQLException, (But its possible in BMP where we manually establish the database connection by writing the JDBC code) bcos SQL related issues are handled internally by the server� I would appreciate if anyone could let me know the possible errors in case of a database connectivity problem. Also, how should one catch those errors.

Thanks
Kishore
 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like this is something that should be found in the server/container documentation.
 
Remember to always leap before you look. But always take the time to smell the tiny ads:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic