Ralph - Thanks for pointing that out, I am new to Tomcat and servlets, and have heard 
about connection pooling but never used it, obviously I should.... I am going to make 
those changes, also going to try the changes to my try block.....

thanks again, I appreciate the advice of people who have experienced these problems 
before, and taking the time to reply to other peoples problems!!!

Geoff

-----Original Message-----
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Sent: June 11, 2002 10:05 AM
To: Tomcat Users List
Subject: AW: Tomcat Unexplained Shutdown



Some sidenotes to your source code:
- You shouldn't open a connection in the init method.
  This way you share one connection between two concurent requests to 
  the same servlet.
  It's better to use a connection pool and get the connection for every
request.
- All your instance variables are dangerous, because they are shared
between
  two concurrent requests to the same servlet.
- Maybe you should use Throwable instead of Exception

   try {
   } catch {Throwable ex}
   } 

This way you will have also control about the Errors that might occur.
> -----Ursprüngliche Nachricht-----
> Von: Geoff Peters [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 11. Juni 2002 14:13
> An: Tomcat Users List
> Betreff: RE: Tomcat Unexplained Shutdown
> 
> 
> Here are the uncompiled servlets (the ones that would 
> possibly cause the shutdowns) - if you need the associated 
> jar file let me know...
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to