You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jess Holle <je...@ptc.com> on 2008/02/13 22:26:52 UTC
Embedding question
I'd like to embed Tomcat in an application for which there will be
numerous instances running.
As such I have 2 basic problems:
1. *catalina.base:* I really want to share /all/ configuration files,
web-app context XMLs, etc -- using separate directories only for
temp, work, and logs. In an ideal world precompiled JSPs would be
shared from one work directory (e.g. CATALINA_HOME/work) to the
various instances and the instances would only write their own
compilations, sessions, etc, to their own separate directories.
Is this possible? Can anyone give me pointers in the sources?
2. *port negotiation:* I need to find an available port -- both for
shutdown and for the AJP connector. I tried using the JMX MBean
factory, etc, but got no signal when the port was already in use.
Pointers to APIs to use that /will/ provide such signals
(exceptions, return values, whatever) would be appreciated.
Overall I'd like to keep this close to an out-of-the-box usage of
6.0.16, except with port negotiation handled outside server.xml, of
course -- and writable directories outside CATALINA_HOME.
Overall pointers (documentation?) would be appreciated.
--
Jess Holle
P.S. I've gotten this working by producing catalina.base directories
containing way more of catalina.home's contents than I can see any
reason for and pre-computing ports to use into each catalina.base, but
this seems wrong overall. I'm looking for something better.
Re: Embedding question
Posted by Jess Holle <je...@ptc.com>.
I could see "pre-negotiating" ports into catalina.base's but I would
like to minimize the weight of the catalina.bases in such a case.
Jess Holle wrote:
> I'd like to embed Tomcat in an application for which there will be
> numerous instances running.
>
> As such I have 2 basic problems:
>
> 1. *catalina.base:* I really want to share /all/ configuration
> files, web-app context XMLs, etc -- using separate directories
> only for temp, work, and logs. In an ideal world precompiled
> JSPs would be shared from one work directory (e.g.
> CATALINA_HOME/work) to the various instances and the instances
> would only write their own compilations, sessions, etc, to their
> own separate directories. Is this possible? Can anyone give me
> pointers in the sources?
> 2. *port negotiation:* I need to find an available port -- both for
> shutdown and for the AJP connector. I tried using the JMX MBean
> factory, etc, but got no signal when the port was already in
> use. Pointers to APIs to use that /will/ provide such signals
> (exceptions, return values, whatever) would be appreciated.
>
> Overall I'd like to keep this close to an out-of-the-box usage of
> 6.0.16, except with port negotiation handled outside server.xml, of
> course -- and writable directories outside CATALINA_HOME.
>
> Overall pointers (documentation?) would be appreciated.
>
> --
> Jess Holle
>
> P.S. I've gotten this working by producing catalina.base directories
> containing way more of catalina.home's contents than I can see any
> reason for and pre-computing ports to use into each catalina.base, but
> this seems wrong overall. I'm looking for something better.