  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Struts - A MVC web framework | | Tomcat - JSP/Servlet container | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | | JSP - A mailing list about Java Server Pages specification and reference | |
Struts & Hibernate
|
|
|
  | | | how can I capture a network failure in datasource.getConnection() | how can I capture a network failure in datasource.getConnection() 2004-07-16 - By Partharanjan Das
Back Hi all,
We are using a connection pool in Tomcat using commons dbcp classes DriverAdaperCPDS (with com.sybase.jdbc2.jdbc.SybDriver class from sybase) and PerUserPoolDataSource. The set-up using server.xml JNDI binding etc. are working fine and the site works well most of the time. The application is a publicly hosted web site expecting a lot of concurrent visitors.
We experienced that at times our pages hang and we found that the problem could be because there is some network problem between tomcat 4.x and sybase 12.5. To simulate our case, we removed network cable and found that the code hangs at this line: Connection con = datasource.getConnection(), though the SQLException over this statement is caught.
Anybody has any idea as to how to trap such na network failure and do a exception handling inside the code itself.
Thanks in advance.
Regards, Partha ********************************************************************* Disclaimer: The information in this e-mail and any attachments is confidential / privileged. It is intended solely for the addressee or addressees. If you are not the addressee indicated in this message, you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. *********************************************************************
=========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
|
|
 |