I think I can get around this problem by moving to tomcat 4. There seems to be a shared classloader for all the webapps. But I am wondering if other app servers also support tomcat-4's classloading structure, otherwise my app will become tc4-only.
--- Brendan Johnston <[EMAIL PROTECTED]> wrote: > Theoretically when a class wants to load a class it > asks its own classloader > to do it. > Its own classloader then asks its parent to do it > and if its parent can't it > tries. > > Some concept of how to work around this might be: > > 1. Have a factory class that return the instances > you want in A1 (therefore > A1 classloader) > > 2. Register the factory it in some collection that > the soap classloader can > see (potentially create some factory registry and > load it with the > application servers classloader) > > 3. Call methods on the factory to get instances > > I have not tested this I may have missed something, > and don't recommend this complex approach. > > I think the answer in your case is to > have fewer (one) web applications. > > Brendan > > > > > -----Original Message----- > From: E B [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 15, 2001 11:34 PM > To: [EMAIL PROTECTED] > Subject: RE: webapps' classpath > > > So that means there are two classloaders: > soap's and the other webapps's (in my case A1). > now when the contol goes from soap to > A1's class, which class loader loads the > classes of A1. ? > Can I make A1's classloader come into picture > and take over things ? > > > --- Brendan Johnston <[EMAIL PROTECTED]> wrote: > > Each Web Application gets its own private class > > loader. > > A class loader can only see classes > loaded/loadable > > by it and by its > > parents. > > The Two Web Applications are siblings, independant > > from each other. > > > > I think you should give each WebApplication a > > complete set of its own > > classes so that you can upgrade each > independantly. > > > > Brendan > > > > > > -----Original Message----- > > From: E B > > To: [EMAIL PROTECTED] > > Sent: 10/15/01 9:04 PM > > Subject: webapps' classpath > > > > I am using apache soap 2.2 with tomcat 3.2.1. > > There seem to be 2 classpaths, one tomcat's > > and the other webappp's WEB-INF/classes. > > For a SOAP service class, which of these two > > is visible first ? > > which of the two is recommended and why ? > > > > I have two web-app's: A1 and A2. (A2 is soap). > > I want to refer A1's objects in A2's class. > > But A1's classes are not visible to A2. why ? > > I had to put A1's classes in tomcat's classpath > > to get it working. > > > > thanks. > > > > > > > > > ____________________________________________________________ > > Do You Yahoo!? > > Get your free @yahoo.co.uk address at > > http://mail.yahoo.co.uk > > or your free @yahoo.ie address at > > http://mail.yahoo.ie > > > > ____________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.co.uk address at > http://mail.yahoo.co.uk > or your free @yahoo.ie address at > http://mail.yahoo.ie > ____________________________________________________________ Nokia Game is on again. Go to http://uk.yahoo.com/nokiagame/ and join the new all media adventure before November 3rd.
