-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------

Nimret Sandhu wrote:

> -----------------------------
> Please read the FAQ!
> <http://java.apache.org/faq/>
> -----------------------------
>
> hello all -
>
> if i start a JServ instance from the command line, does JServ only use one
> classloader to load all classes or does it load the classes specified in the
> repository param of the zone file in the auto-reloading ( adaptive?!)
> classloader?
>

Apache JServ uses a class loader per zone.  The "class path" for this loader is
the set of directories and ZIP/JAR files you list as "repositories=xxx" entries
in that zone configuration file.

Starting Apache JServ from the command line or automatically does not matter in
this regard.  The only difference between the two is how the system class path
is set:

* If you start Apache JServ from the command line,
  it is passed in the CLASSPATH environment variable
  (or can be overridden on the command line).

* If you start Apache JServ automatically when Apache
  starts, the CLASSPATH environment variable is ignored.
  Instead, the class path entries are set by using
  "wrapper.classpath" properties in the JServ config file.

The zone class loader (an instance of the AdaptiveClassLoader class) implements
automatic reloading, but it can only do so for classes loaded from the
repositories -- not from the system class loader.

>
> it appears to do the former. when i setup my classpath from the command line
> to exclude my servlets and try to run them, i get the ol' 'cannot scan
> servlet headers' error. but, when i add the path specified by the repository
> entry to the classpath and restart jserv from the command line, it finds the
> servlets and works fine.
>

Every class you want to load has to be on either the system class path (defined
as described earlier) or the repositories list for the zone you use it in.  No
classes should appear on both lists.  Automatic reloading only works for
classes found in the repositories -- not for classes found in the system class
path.

>
> anyone else come across this problem?
> software: Apache 1.3.6, JServ 1.0 and NT Server 4.0
> regs,
>

What you are describing is the normal operation of the system.  So tell me
again what the problem is?  :-)

Craig McClanahan




--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to