tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: classreloading and 4.x
Date Wed, 03 Jan 2001 06:15:25 GMT
Jon Stevens wrote:

> on 1/2/2001 6:22 PM, "Craig R. McClanahan" <Craig.McClanahan@eng.sun.com>
> wrote:
>
> > I just tried this again (against current CVS code) with Vincent's original
> > test
> > cases and it works fine for me.  I can send you the test suite if you like, to
> > verify that it works/doesn't work in your environment.
> >
> > One issue that might cause this appearance is if you don't wait long enough.
> > By
> > default, Tomcat 4.0 checks for classfile changes every 15 seconds, if
> > reloadable
> > is set to true.  You can change this as follows:
> >
> > <Context path="" docBase="scarab" reloadable="true">
> > <Loader checkInterval="5"/>
> > </Context>
> >
> > As an alternative (and this works even on apps that you have not defined as
> > "reloadable" in server.xml), consider this strategy:
> >
> > * Install the "manager" webapp that comes with Tomcat if not
> > present already.
> >
> > * Create a user with role "manager" in server/tomcat-users.xml
> > (actual username and password are arbitrary).
> >
> > * Whenever you want to restart Scarab, issue an HTTP request to:
> > http://localhost:8080/manager/reload?path=/xxx
> > where /xxx is the context path (empty string for the root webapp).
> >
> > * You will need to log on (BASIC authentication) the first time you
> > do this, with the username/password you created above.
>
> Na. That is annoying. :-) I would rather just have this check turned down to
> something like 3 seconds. I didn't realize that there is a Loader
> checkInterval setting.
>

's OK -- you will thank me the first time you need to update a deployed app on a
production server without taking down Catalina :-).

>
> BTW, where is the DTD for the server.xml file? There isn't one defined at
> the top of the file.
>

There is none, and cannot be (for the same reason you cannot write a complete DTD
for Ant) -- the set of elements, and the attributes supported by a particular
element, are extensible.

There is the beginnings of documentation for all of the available options -- mostly
up to date but not complete yet -- at the following location in the source tree:

    catalina/docs/config/index.html


>
> > NOTE:  In reviewing the code, it looks like this won't handle the root webapp
> > correctly until I do a quick bugfix, but the basic principle applies.
>
> Can you email me privately a copy of the fixed server.jar file as I can't
> build Tomcat yet. :-)
>

The patch is in CVS now.  I will send you the test suite I use, and the most recent
"catalina.jar" -- the file of interest is
"org/apache/catalina/servlets/ManagerServlet.class".

For anyone who cannot figure out how to get the build to work :-) there is always
the nightly binary distributions:

    http://jakarta.apache.org/builds/jakarta-tomcat-4.0/nightly/

Tonight's post (at around 5am Pacific time) will include the fix.

>
> thanks,
>
> -jon
>

Craig


>
> --
> Honk if you love peace and quiet.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-dev-help@jakarta.apache.org


Mime
View raw message