tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florent BENOIT <>
Subject Classloader when Tomcat is embedded + save
Date Tue, 09 Sep 2003 12:32:10 GMT

When we embed Tomcat in an application server, we have the following 
problem that we must "patch".
It would be good if in the Tomcat 5.x branch, this will be fixed.

The problem :

It's about the setClassPath() method of the class WebappLoader of the 
package org.apache.catalina.loader.

This is the following code :

        int layers = 0;
        int n = 0;
        while ((layers < 3) && (loader != null)) {

So, the classpath is set to 3 level.
When JOnAS is embedded, several URL Classloader can be parent 
classloader and not set to 3 levels.
So, for example if we have an application server classloader, ear 
classloader, ejb classloader, web classloader, etc.
The final classpath has some missing jars which can be found on a layer 
 >= 3.
So, please, if you can :
 - remove this test on this value (only testing (loader != null) and we 
stop when it's not anymore an URLClassLoader
 - or that we can configure this value by a system property or anything 
It will make a better integration of the Tomcat product, without having 
to set the right classpath with the same method but without the number 3.

Another request is if the save action to the server.xml file could not 
saved some configurable parameters.
For example, in a j2ee application server, some contexts are created at 
the runtime, but we don't want that these contexts will be stored on the 
server.xml as their path are sometimes dynamic, temporary, etc.
So if we could add/remove/configure the actions of the save() method, it 
would be great for a better integration.
I can understand that this is not your priority but it can be a good 
feature when we embed Tomcat. Thanks.

Best regards,


ObjectWeb JOnAS server

View raw message