tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Getting a handle to a Container/Catalina/Embedded instance
Date Thu, 29 Jul 2004 15:54:42 GMT

Sure, in a couple of ways.  One is to use the Catalina code, starting
Server server = ServerFactory.getServer();
You can then cast to StandardServer, crawl down the hierarchy to
Service, Engine, Host, Connector, Context, etc, and call methods on each
in turn as you need.  Server and ServerFactory are in
org.apache.catalina, so your code would need to import those classes and
run in a classloader that sees them.

The other way is using JMX.  Not all the operations and attributes are
exposed via JMX, but most are.

Yoav Shapira
Millennium Research Informatics

>-----Original Message-----
>From: Carl Olivier []
>Sent: Thursday, July 29, 2004 11:47 AM
>To: Tomcat Users List
>Subject: Getting a handle to a Container/Catalina/Embedded instance
>Not sure this is possible, but here goes:
>I want to be able to get a handle to the Catalina/Embedded instance in
>standard Tomcat standalone implementation.  I will deploy a webapp to
>server/webapps location and mount it to a host which runs in its own
>for security reasons etc.
>Is this possible?
>I want to be able to dynamicall add a host to the server instance,
>it up in memory, adding the new instance to a specified
>component, and then start it - thus not having to restart Tomcat
>when a new host is added.
>Am I looking in the correct places/going in the right direction here?
>can someone point me in a better direction?
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message