tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carl Olivier <c...@zero-one.co.za>
Subject RE: Getting a handle to a Container/Catalina/Embedded instance
Date Thu, 29 Jul 2004 16:14:51 GMT
Hi Yoav.

Thank you for your quick response (as always!).

I will look into your suggestions!  Thanks!

Carl

-----Original Message-----
From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com] 
Sent: Thursday, July 29, 2004 5:55 PM
To: Tomcat Users List
Subject: RE: Getting a handle to a Container/Catalina/Embedded instance


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:carl@zero-one.co.za]
>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: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message