Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 42612 invoked from network); 9 Sep 2003 14:44:26 -0000 Received: from unknown (HELO ecbull20.frec.bull.fr) (129.183.4.3) by daedalus.apache.org with SMTP; 9 Sep 2003 14:44:26 -0000 Received: from bull.net (wallis.frec.bull.fr [129.183.91.17]) by ecbull20.frec.bull.fr (8.9.2/8.9.1) with ESMTP id OAA06692 for ; Tue, 9 Sep 2003 14:32:02 +0200 Message-ID: <3F5DC84A.6040003@bull.net> Date: Tue, 09 Sep 2003 14:32:10 +0200 From: Florent BENOIT User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: tomcat-dev@jakarta.apache.org Subject: Classloader when Tomcat is embedded + save Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello, 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 else. 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, Florent. ObjectWeb JOnAS server http://jonas.objectweb.org