Hi,
Sure, in a couple of ways.  One is to use the Catalina code, starting
with:
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 [mailto:[EMAIL PROTECTED]
>Sent: Thursday, July 29, 2004 11:47 AM
>To: Tomcat Users List
>Subject: Getting a handle to a Container/Catalina/Embedded instance
>
>Greetings..
>
>Not sure this is possible, but here goes:
>
>I want to be able to get a handle to the Catalina/Embedded instance in
a
>standard Tomcat standalone implementation.  I will deploy a webapp to
the
>server/webapps location and mount it to a host which runs in its own
>service
>for security reasons etc.
>
>Is this possible?
>
>I want to be able to dynamicall add a host to the server instance,
setting
>it up in memory, adding the new instance to a specified
Container/Engine
>component, and then start it - thus not having to restart Tomcat
completely
>when a new host is added.
>
>Am I looking in the correct places/going in the right direction here?
Or
>can someone point me in a better direction?
>
>Regards,
>
>Carl
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to