Following this document
https://cwiki.apache.org/GMOxDOC30/configuring-virtual-host-in-tomcat.html
(I realize this is still the 2.2 documentation that is not updated, but bare
with me.)
The document explains how to edit var/config/config.xml manually to define a
Tomcat Virtual Host GBean.
However, In Geronimo 3.0, is it possible to use the deployer to deploy a plan
for a GBean that identifies a Tomcat Virtual Host?
Let me get the answer started with a partial plan, below, which I might deploy
as: `bin/deploy deploy tomcat-vhost.xml`
The Geronimo deployer does not like the '=' characters in the <attribute
name="initParams"> section, nor the 'pattern' elemement in the <reference
name="Engine"> sections in this plan.
If it is possible to deploy a gbean with the deployer for a Tomcat Virtual Host,
what do I need to change in the plan below to make that happen?
-
<module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
<environment>
<moduleId>
<groupId>org.example.configs.virtualhosts</groupId>
<artifactId>virtualhost1</artifactId>
<version>1.0</version>
<type>car</type>
</moduleId>
<dependencies>
<dependency>
<groupId>org.apache.geronimo.configs</groupId>
<artifactId>tomcat7</artifactId>
<type>car</type>
</dependency>
</dependencies>
<hidden-classes/>
<non-overridable-classes/>
</environment>
<gbean class="org.apache.geronimo.tomcat.HostGBean"
name="org.apache.geronimo.configs/tomcat7/3.0-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat7/3.0-SNAPSHOT/car,j2eeType=Hos$
<attribute
name="className">org.apache.catalina.core.StandardHost</attribute>
<attribute name="initParams">
<![CDATA[
name=virtualhost1.com
appBase=
workDir=work
]]>
</attribute>
<reference name="Engine">
<pattern>
<name>TomcatEngine</name>
</pattern>
</reference>
</gbean>
</module>
-