jon * wrote:

> > That means a servlet com.foo.bar.Servlet instantiating com.foo.bar.HelperClass
> may
> > not lie in in the same directory structure "com/foo/bar"?
>
> No. You can do that. What it means is what you said..the servlets must not
> be reachable by the classpath that is defined in wrapper.classpath as well
> as any "global" classpaths that you have defined in the shell that started
> the jserv process.

I was a little bit unprecise here. I mean they may not lie in the same absolute
directory structure. com.foo.bar.Servlet and com.foo.bar.HelperClass must not lie in
the same directory /code/servlets/com/foo/bar as I have to use /code/servlets for
both repository and wrapper path? Is there any nice structure for dividing the
servlet classes from the utility classes? I would suggest using /code/servlets for
repository and /code/servlets/utility for wrapper. You really have to devide the
classes. That is not that 'nice' for your logical package structure or when using
cvs...

I've made up some thoughts on how the classloading works. As I'm not that deep into
the classloading theme, I hope my question are not too stupid...
You've got the default VM classloader which gets the classpath specified by the
wrapper statement. I assume the default classloader is always tried first to
retrieve a class. So when it discovers the servlet class it loads it and all
following classes are also loaded by the default class loaders. This makes reloading
of classes impossible. But when the default class loader is not able to find the
class, JServ's classloader tries to find it. JServ's classloader also gets the path
specified in the wrapper statement so the following instantiated classes are also
found by it.  JServ's classloader is somehow checking the timestamps and reloads the
classes when necessary.
You don't have to comment on this if this is absolutely rubbish ;-)

Cheers
Henning

--
Henning Saul
[EMAIL PROTECTED]




----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://www.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to