I wrote a test jsp having codes below and it caught the exception. The
problem is how to dismiss the existing bean and create new one?
Jack
<% try{%>
<jsp:useBean id="db" class="dbPool" scope="application"/>
<%
}
catch(Exception e){
out.println("caught the exception");
out.println(e.getMessage());
}
%>
-----Original Message-----
From: Randy Layman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 9:03 AM
To: [EMAIL PROTECTED]
Subject: RE: Bean in application scope
This sounds like something that you need to deal with in the
internals of your bean - using the Connection's isClosed method (or
something like that).
Randy
> -----Original Message-----
> From: Jack Li [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 26, 2001 9:28 AM
> To: '[EMAIL PROTECTED]'
> Subject: Bean in application scope
>
>
> Hello,
>
> I have a java bean in application scope. The bean creates a database
> connection pool. However, sometime the database gets reboot.
> Then, the jsp
> pages have the bean included get crashed. How do I detect the
> exception and
> reinitialize the bean?
>
> Thanks
> Jack
>