You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Koneru, Narendra" <nk...@informatica.com> on 2005/12/09 23:47:11 UTC
Question related to adding new services dynamically
Hi,
I tried hard but could not find any information regarding the following:
The problem is this:
* We want to add a new tomcat service (I am referring to a service
in server.xml) dynamically to be run on a different port within the same
tomcat instance.
* We want to do this without restarting the tomcat.
* We should be able to start/stop this service (any webapps within
this service) dynamically without starting/stopping services.
There will be already some tomcat webapps running on a standard port
configured in server.xml. What I want to do is that based on some input
from the user, I should start new webapps on a different port and this
port number is dynamic.
Is there a way I can achieve this functionality. I looked at the manager
application but it only allows to add/remove webapps within a static
pre-configured port number.
I am able to achieve by hacking some of the tomcat code and installing
my class in the Catalina loader that can access classes like
StandardEngine, etc. I am not sure if there are any caveats to it.
Please let me know.
Thanks.
Naren
RE: Question related to adding new services dynamically
Posted by Carl Olivier <ca...@unysen.co.uk>.
Hi.
Not sure if it is the most "approved" option, but there is a priveleged
attribute in the <Context /> which when set to true (privileged="true")
gives the classloader (and your classes) access to the tomcat/catalina
internals - thus no need for your "hacking" etc.
Just a thought.
Regards,
Carl
-----Original Message-----
From: Koneru, Narendra [mailto:nkoneru@informatica.com]
Sent: 09 December 2005 22:47
To: users@tomcat.apache.org
Subject: Question related to adding new services dynamically
Hi,
I tried hard but could not find any information regarding the following:
The problem is this:
* We want to add a new tomcat service (I am referring to a service
in server.xml) dynamically to be run on a different port within the same
tomcat instance.
* We want to do this without restarting the tomcat.
* We should be able to start/stop this service (any webapps within
this service) dynamically without starting/stopping services.
There will be already some tomcat webapps running on a standard port
configured in server.xml. What I want to do is that based on some input from
the user, I should start new webapps on a different port and this port
number is dynamic.
Is there a way I can achieve this functionality. I looked at the manager
application but it only allows to add/remove webapps within a static
pre-configured port number.
I am able to achieve by hacking some of the tomcat code and installing my
class in the Catalina loader that can access classes like StandardEngine,
etc. I am not sure if there are any caveats to it.
Please let me know.
Thanks.
Naren
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org