On Thu, 2 Jan 2003, Turner, John wrote:

> Date: Thu, 2 Jan 2003 13:51:42 -0500
> From: "Turner, John" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: can tomcat do dynamic virtual hosts?
>
>
> Hmmmm...interesting point.  What does the admin webapp do, then, that you
> couldn't do from the command line?

When server.xml is parsed at Tomcat startup time, the executed code
creates instances of the internal Catalina objects that correspond to each
element -- for example, a <Host> declaration causes the creation of a new
instance of "org.apache.catalina.core.StandardHost" -- that is then
configured with the properties and attached to the owning object (in the
case of a host, it's the o.a.c.c.StandardEngine instance that corresponds
to the <Engine> element).

The admin webapp simply performs the same operation, but at runtime (no
restart required).

>  Is there something similar to Apache's
> 'apachectl restart' for Tomcat?
>

No there's not.  Even if it were to be implemented, I'm betting that the
time required would be essentially equivalent to shutdown/restart.  It's
also irrelevant for the things that can be changed dynamically (such as
adding a virtual host), except for the fact that the web connector stuff
probably doesn't respect dynamic changes like this (I don't have a clue on
that part).

> Can you call the admin webapp with a URL and have it do things?  If so,
> that's the answer to the original post...you would just need a script to
> send the appropriate command, much like ant would or whatever, to the admin
> webapp.

In principle, it would be pretty straightforward to extend the manager
webapp to do things like this (so that it would be easily scriptable from
a command line or Ant script).  In fact, there's discussion on the
developer list, with respect to Tomcat 5, to enabling pretty much all of
the administrative change type features via JMX (which is what the admin
webapp is already using) and making them available remotely.  A small
amount of refactoring inside Catalina will be required to make this work
(such as making the startup code that reads server.xml just use the same
JMX operations instead of duplicating things), but that's not a huge
amount of work.

As for the web connectors, you'll need to ask someone who understands and
works on them what the plans are for supporting dynamic configuration
changes.  Given that Apache doesn't appear to support them, I would guess
this is going to be a challenge -- but that's outside my area of
expertise.

>
> John
>

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to