Hello Tomcat crew,

I'm working on a slick OpenEJB/Tomcat integration (finally), and am
running into a bit of a stickiness on ClassLoading and JSP Compilation.
The integration I'm doing allows users to just put one OpenEJB library
in the Tomcat common/lib directory.  The first time OpenEJB is
referenced, all the required libraries are sucked into the common
classloader by calling StandardClassLoader.addRepository.

This seems to nicely update the internal repository, which serves great
for all the executing Servlets.  The stickiness is that this seems to
have no effect for JSPs.  It looks like their classpaths are constructed
at startup and not rebuilt when classes are added to the Common or
Shared classloader.

It looks like the opportunity to build a classpath from the URLs in the
StandardClassLoader is in the JspRuntimeContext.initClassPath method.
It's unclear to me when this code is executed (seems only at startup) or
if there is a way to force it to recreate the classpath.

I've worked around the problem by also updating the "java.class.path"
variable whenever I add something to the Common classloader.  Though I'm
not actually adding classes to the System classloader, it still strikes
me as, oh, let's just say "yucky."

Any insight or advice is extremely welcome.

-David


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>

Reply via email to