Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 97977 invoked by uid 500); 27 Jul 2001 17:48:10 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: tomcat-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 97961 invoked from network); 27 Jul 2001 17:48:10 -0000 Received: from h32.sny.collab.net (HELO icarus.apache.org) (64.208.42.42) by h31.sny.collab.net with SMTP; 27 Jul 2001 17:48:10 -0000 Received: (qmail 17288 invoked by uid 1059); 27 Jul 2001 17:44:42 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 27 Jul 2001 17:44:42 -0000 Date: Fri, 27 Jul 2001 10:44:42 -0700 (PDT) From: "Craig R. McClanahan" X-Sender: craigmcc@localhost To: tomcat-user@jakarta.apache.org Subject: Re: How to integrate own ClassLoader In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: localhost 1.6.2 0/1000/N X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N On Fri, 27 Jul 2001, Herrmann, Michael wrote: > Hallo, > > Has anyone a hint if it is possible to replace the ClassLoader > which Tomcat uses to load servlets. > > Do to so I also can give Tomcat a ClassLoader which is a > child loader of the one it used for loading servlets. > But I don't know how to configure Tomcat that way. > You can do so by modifying Tomcat sources, and making sure that your custom class loader conforms to the requirements of Tomcat as well as your own app. But this is *definitely* not for the faint of heart. It requires very intimate knowledge of how class loaders work, and how Tomcat uses them. > The reason is that I have code which relies an a specific > ClassLoader and I like to execute it as a servlet. > You'd probably be better served running your code in a separate JVM (with its own classloader), and setting up access to it (from your servlets) via RMI or CORBA. > Any hints are welcome, > Michael Herrmann > > > Craig McClanahan