Hi Hernan,
Excellent! This helps me quite a bit... I am getting much further
along now.
I'll look forward to your next reply and to your wiki update.
Thank you!
-Mark
On Oct 19, 2006, at 4:10 PM, Hernan Cunico wrote:
Hi Mark,
I still haven't fixed the sample on the wiki and the workaround I
found is not the definitive way to do it but may help you momentarily.
This is a geronimo-web.xml I just successfully tested in Geronimo
v1.1.1 with a single web application, I tried the HelloWorld sample.
This plan defines a new virtual host, web container and a single
web connector on port 8081. Since the virtual host is "mapped" to
the same host name as the default host you are not seeing any
particular benefit from the virtual host itself. This is not the
prettiest way to configure it but it work for now ;-)
I'll look for the right way to do it and then will update the
sample on the wiki.
<?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
Mark Bradley wrote:
I'm still stuck on this, and unfortunately I cannot deploy my
applications in production with Geronimo until I get this working.
Has anyone been able to deploy two different applications to two
different tomcat connectors in the same Geronimo instance? As
shown below, the example on the wiki does not work!
Thanks,
-Mark
Well, I thought that I might be able to take the example in wiki
(http://cwiki.apache.org/GMOxDOC11/exposing-web-applications-on-
distinct-ports.html) and whittle it down to what I need, but I
can't even deploy the example .ear( appPerPort.ear). I get this
error:
geronimo-1.1.1% java -jar bin/deployer.jar deploy appPerPort.ear
Error: Unable to distribute appPerPort.ear: Cannot deploy the
requested application module because no deployer is able to
handle
it. This can happen if you have omitted the J2EE deployment
descriptor, disabled a deployer module, or if, for example,
you are
trying to deploy an EJB module on a minimal Geronimo server that
does not have EJB support installed.
(moduleFile=/Users/mark/Programs/geronimo-1.1.1/var/temp/
geronimo-deployer4506.tmpdir/appPerPort.ear)
and here is the stack trace in the log:
Deployer operation failed: Cannot deploy the requested
application module because no deployer is able to handle it. This
can happen if you have omitted the J2EE deployment descriptor,
disabled a deployer module, or if, for example, you are trying to
deploy an EJB module on a minimal Geronimo server that does not
have EJB support installed. (moduleFile=/Users/mark/Programs/
geronimo-1.1.1/var/temp/geronimo- deployer4504.tmpdir/
appperport.ear) org.apache.geronimo.common.DeploymentException:
Cannot deploy the requested application module because no
deployer is able to handle it. This can happen if you have
omitted the J2EE deployment descriptor, disabled a deployer
module, or if, for example, you are trying to deploy an EJB
module on a minimal Geronimo server that does not have EJB
support installed. (moduleFile=/Users/mark/Programs/
geronimo-1.1.1/var/temp/geronimo-deployer4504.tmpdir/
appperport.ear) at org.apache.geronimo.deployment.Deployer.deploy
(Deployer.java:239) at
org.apache.geronimo.deployment.Deployer.deploy (Deployer.java:
124) at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB
$ $734a235d.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:
53)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke
(FastMethodInvoker.java:38) at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke
(GBeanOperation.java:122) at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke
(GBeanInstance.java:852) at
org.apache.geronimo.kernel.basic.BasicKernel.invoke
(BasicKernel.java:239) at
org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.do
Depl oy(AbstractDeployCommand.java:106) at
org.apache.geronimo.deployment.plugin.local.DistributeCommand.run
(DistributeCommand.java:60)
at java.lang.Thread.run(Thread.java:613)
Any ideas?