Env: Tomcat 6.0.14, JRE1.6 I have an application comprising a number of distinct webapp contexts which use a common version of certain jarfiles. Loading an instance of the jarfiles by each webapp classloader takes up a lot of memory. Hence, I have moved these jarfiles to ${CATALINA_BASE}/lib. So we have: "common classes" ==> ${CATALINA_BASE}/lib "webapp-specific classes" ==> ${CATALINA_BASE}/webapps/<foo>/WEB-INF/lib
This has been the beginning of my problems: the common classes make direct and indirect references to the webapp-specific classes during the context loading. As an example, a webapp invokes digester at context load. While the digester itself is present in "commons classes", the digester rules refer to webapp-specific classes. This causes the digester to fail, thus aborting the context with a listenerStart ERROR message. This seems occur because since digester is loaded by commons classloader, it has no access to the webapp-specific classes. Carried to an extreme, I would have to place all of webapp-specific classes in ${CATALINA_BASE}/lib as well. Clearly this would be broken. Here are my questions: 1) There must be a way to neatly factor out into common classloader classes shared by a number of cooperating webapp contexts. What would such a scheme be? 2) In the lifecycle of a webapp context: - when is the webapp classloader "born"? - is the webapp classloader loaded by the commons classloader or the system classloader? - which classloader loads the context loader listener? Pl help - I have been chasing my own tail with this problem for quite sometime! Thanks, /U --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]