tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Alborini <sebastien.albor...@m4x.org>
Subject Tomcat + jBoss class loader integration
Date Wed, 04 Oct 2000 01:51:34 GMT
Hi, 

Following Aaron Mulder's post on the subject, I've finally managed 

- to make tomcat and jboss live in the same VM (using the
org.apache.tomcat.startup.EmbededTomcat launcher)

- to make a jboss container and a tomcat context share the same
classloader.  This means that they can exchange objects without relying
on RMI, and without the odd behavior Aaron described (same class +
different classloader = different class).  With this, they can
communicate *MUCH* faster.

The idea was to use the context classloader as a parent in both tomcat
and jboss.  The deployer tool can then feed this context classloader
before calling jboss.deploy and EmbededTomcat.addContext.  It requires a
one-line change in tomcat's code (see patch) : setting the
AdaptiveServletLoader's parent to the contextClassLoader instead of
this.getClass().getClassLoader().

This change does not seem to affect tomcat otherwise, since the default
ContextClassLoader always contains tomcat's classes.

This has been tested with tomcat 3.2b4 / 3.2b5

Thanks, 

Sebastien
Mime
View raw message