2010/8/3 Lohner Roland <loc...@gmail.com>: > Dear Developers, > > I am writing about a proposal for a new feature in Tomcat. >
(...) > so the only solution at the > moment is to use a J2EE container and deploy an enterprise module which > causes unnecessary overheat. I think the following should work: 1. Separate the interfaces, and _all the classes they need_, into a separate JAR. 2. Put the JAR into ${catalina.base}/lib. 3. _Remove_ all those shared classes from web applications! (Because otherwise classes loaded from web applications have priority over the shared ones, as explained in http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html ) 4. If you need some shared service, place it into JNDI (GlobalNamingResources element in server.xml). You can also add a Listener to server.xml to preload some classes or instantiate any static object. 5. Restart Tomcat. > > A less elaborate, hackish, but basically working implementation of this > special web application class loader is attached to this email. The attachment was removed by mailing list software. Maybe if you rename it to *.txt it will be allowed, but it is just a guess. Anyway, if it works how you describe it it seeks for trouble. A web application and be unloaded (stopped, reloaded) at any time. Since that moment any classes loaded by its classloader should not be accesses any more. Thus, no other web applications should keep references to them. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org