I'm trying to implement a lifecycle listener to initialise and, more importantly, shutdown a resource that I wish to access from multiple webapps.
If I put my listener class in common/classes then I get an error on startup: SEVERE: Begin event threw error java.lang.NoClassDefFoundError: org/apache/catalina/LifecycleListener If I put the listener class in server/classes then the server starts up ok but the class can't be used by any webapps. Is there a way around this? To describe the bigger picture, I have a singleton class that is managing a resource via JNI that is required by several webapps. It's important that I can control the initialisation/shutdown of this resource. I've tried a shutdownhook and a finalize method but neither of these are invoked by Tomcat when it shuts down, hence my interest in a lifecycle listener. Because the resource is used across multiple webapps, the standard contextlistener approach won't work. I'm running Tomcat 5.5 as a Windows service. Any help/suggestions would be much appreciated. Simon. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]