Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 61135 invoked from network); 2 Jan 2003 19:22:30 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 2 Jan 2003 19:22:30 -0000 Received: (qmail 24994 invoked by uid 97); 2 Jan 2003 19:23:30 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 24978 invoked by uid 97); 2 Jan 2003 19:23:29 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 24966 invoked by uid 98); 2 Jan 2003 19:23:28 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: Thu, 2 Jan 2003 11:22:05 -0800 (PST) From: "Craig R. McClanahan" To: Tomcat Users List Subject: RE: can tomcat do dynamic virtual hosts? In-Reply-To: <83F0258A9996D311B14200A0C98F173602F22B0E@aas-internet.aas.com> Message-ID: <20030102111254.G50207-100000@icarus.apache.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: localhost 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Thu, 2 Jan 2003, Turner, John wrote: > Date: Thu, 2 Jan 2003 13:51:42 -0500 > From: "Turner, John" > Reply-To: Tomcat Users List > To: 'Tomcat Users List' > 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 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 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: For additional commands, e-mail: