Thanks to all for the input - I am ending up doing some refactoring to follow 
Ben's advice wrt a POJO that does the heavy lifting stored in context, making 
the destroy() essentially a no-op rather than doing full shutdown, and using 
the ContextListener to really do final shutdown using the POJO when the context 
itself is destroyed.

-----Original Message-----
From: Ben Souther [mailto:b...@souther.us] 
Sent: Friday, July 27, 2012 1:56 PM
To: users@tomcat.apache.org
Subject: RE: Permanent servlet in TC7

On Thu, 2012-07-26 at 19:54 +0000, Chip McVey wrote:
> So I'm looking for a guarantee that no automatic destroys will happen 
> going forward just because Tomcat decides to do it on its own.  If it 
> is instructed to shutdown/undeploy/unload by some outside system or by 
> a human user, that's fine, I'm not worried about that.  But I don't 
> want these servlets to be destroyed just because Tomcat decides to do 
> so for whatever reason.

If I were looking for permanence, I would create POJO, bind it to context 
scope, and then call it from my servlets, passing it whatever it needs to 
function.



Reply via email to