You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Hernan Cunico <hc...@gmail.com> on 2006/10/19 21:50:08 UTC
deploying apps to a specific port
Hi All,
is there a way to deploy a particular application to a specific port without having to define an entirely new virtual host?
is it possible to point/bind to a specific (already defined) web connector?
Cheers!
Hernan
Re: deploying apps to a specific port
Posted by Hernan Cunico <hc...@gmail.com>.
Thanks for the quick reply David. This is the geronimo-web.xml I tried and it worked but I am also creating a new virtual host.
It didn't look right when I first tried it and you just confirmed this is not the right way to do it. However all my attempts to define a new container and connector failed to deploy or to start if I wasn't also defining a whole new virtual host.
Any pointer for where "cut" this plan?
Thanks in advance.
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
<environment>
<moduleId>
<groupId>samples.applications</groupId>
<artifactId>HelloWorldApp</artifactId>
<version>1.1</version>
</moduleId>
</environment>
<context-root>/hello1</context-root>
<web-container>
<gbean-link>TomcatWebContainer1</gbean-link>
</web-container>
<gbean name="TomcatWebConnector1" class="org.apache.geronimo.tomcat.ConnectorGBean">
<attribute name="name">HTTP</attribute>
<attribute name="host">localhost</attribute>
<attribute name="port">8081</attribute>
<attribute name="maxHttpHeaderSizeBytes">8192</attribute>
<attribute name="maxThreads">150</attribute>
<attribute name="minSpareThreads">25</attribute>
<attribute name="maxSpareThreads">75</attribute>
<attribute name="hostLookupEnabled">false</attribute>
<attribute name="redirectPort">8453</attribute>
<attribute name="acceptQueueSize">100</attribute>
<attribute name="connectionTimeoutMillis">20000</attribute>
<attribute name="uploadTimeoutEnabled">false</attribute>
<reference name="TomcatContainer">
<name>TomcatWebContainer1</name>
</reference>
</gbean>
<gbean name="TomcatWebContainer1" class="org.apache.geronimo.tomcat.TomcatContainer">
<attribute name="catalinaHome">var/catalina</attribute>
<reference name="EngineGBean">
<name>TomcatEngine1</name>
</reference>
<reference name="ServerInfo">
<name>ServerInfo</name>
</reference>
<reference name="WebManager">
<name>TomcatWebManager</name>
</reference>
</gbean>
<gbean name="TomcatEngine1" class="org.apache.geronimo.tomcat.EngineGBean">
<attribute name="className">org.apache.geronimo.tomcat.TomcatEngine</attribute>
<attribute name="initParams">
name=Geronimo1
</attribute>
<reference name="DefaultHost">
<name>TomcatHost1</name>
</reference>
<references name="Hosts">
<pattern>
<name>TomcatHost1</name>
</pattern>
</references>
<reference name="RealmGBean">
<name>TomcatJAASRealm</name>
</reference>
</gbean>
<gbean name="TomcatHost1" class="org.apache.geronimo.tomcat.HostGBean">
<attribute name="className">org.apache.catalina.core.StandardHost</attribute>
<attribute name="initParams">
name=localhost
appBase=
workDir=work
</attribute>
</gbean>
</web-app>
Cheers!
Hernan
David Jencks wrote:
>
> On Oct 19, 2006, at 12:50 PM, Hernan Cunico wrote:
>
>> Hi All,
>> is there a way to deploy a particular application to a specific port
>> without having to define an entirely new virtual host?
>
> AFAICT the only way to get app-per-port binding in either tomcat or
> jetty is to define an entire web container + connector(s) for each port
> and deploy each app to connect to the appropriate web container. This
> mimics the setups I've seen in tomcat server.xml files and IIUC from
> conversations with gregw is also the correct approach for jetty. So, a
> new virtual host is not enough or correct.
>>
>> is it possible to point/bind to a specific (already defined) web
>> connector?
>
> The web-container element in the geronimo plan lets you specify the web
> container you want to deploy on. You can't specify a web connector in
> any way and it doesn't make sense to try to in either the tomcat or
> jetty architectures.
>
> thanks
> david jencks
>
>>
>> Cheers!
>> Hernan
>
>
Re: deploying apps to a specific port
Posted by David Jencks <da...@yahoo.com>.
On Oct 19, 2006, at 12:50 PM, Hernan Cunico wrote:
> Hi All,
> is there a way to deploy a particular application to a specific
> port without having to define an entirely new virtual host?
AFAICT the only way to get app-per-port binding in either tomcat or
jetty is to define an entire web container + connector(s) for each
port and deploy each app to connect to the appropriate web
container. This mimics the setups I've seen in tomcat server.xml
files and IIUC from conversations with gregw is also the correct
approach for jetty. So, a new virtual host is not enough or correct.
>
> is it possible to point/bind to a specific (already defined) web
> connector?
The web-container element in the geronimo plan lets you specify the
web container you want to deploy on. You can't specify a web
connector in any way and it doesn't make sense to try to in either
the tomcat or jetty architectures.
thanks
david jencks
>
> Cheers!
> Hernan