Hi, Why go through all this? The point of the JNDI Resources part of the Servlet Specification is to allow portable interaction with external resources. Your approach loses all the portability (it's Tomcat-specific) without gaining much of anything. You could do the same stuff in your webapp, instead relying on a portable notification of app shutdown (ServletCotnextListener) and managing your own object creation/destruction.
Good question. Because we have a few services we'd like shared between all webapps. While you are correct that getting the service into JNDI is Tomcat specific (which is why I'm pulling for a writable JNDI context :), getting the service out from JNDI is standard.
So while we could put all the classes into common/lib and use a singleton pattern, I wouldn't have a way to cleanly shut down the service on app server shutdown (I could be wrong here).
Seth
-- <a href="http://www.picklematrix.net/foaf.rdf">Seth Ladd's FOAF</a> <a href="http://www.foaf-project.org/">What is FOAF?</a>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
