Patches item #439475, was opened at 2001-07-08 08:08
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=439475&group_id=22866

Category: JBossServer
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Kurt Huwig (kurti)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add virtual host support

Initial Comment:
This patch adds virtual host support when using it with
(at least) Tomcat. There is a new attribute
'VirtualHost' for the 'J2eeDeployer'. For each virtual
host, you need a separate J2eeDeployer and a separate
AutoDeployer for convenience.

I tried it with 2.2.2, but there seems to be nothing
changed in the current 2.4 code. I did not try it with
Jetty, but as it just sets attributes and doesn't
change any class contract, it should not break
anything. If you omit the 'VirtualHost' attribute,
everything works as before.

Here is a example with two auto-deployers:

  <mbean code="org.jboss.deployment.J2eeDeployer"
name="J2EE:service=J2eeDeployer">
    <attribute name="DeployerName">Default</attribute>
    <attribute
name="JarDeployerName">:service=ContainerFactory</attribute>
    <attribute
name="WarDeployerName">:service=EmbeddedTomcat</attribute>
  </mbean>
 
  <mbean code="org.jboss.deployment.J2eeDeployer"
name="J2EE:service=iKuJ2eeDeployer">
    <attribute name="DeployerName">Default</attribute>
    <attribute
name="JarDeployerName">:service=ContainerFactory</attribute>
    <attribute
name="WarDeployerName">:service=EmbeddedTomcat</attribute>
    <attribute
name="VirtualHost">www.iku-netz.de</attribute>
  </mbean>
 
  <mbean code="org.jboss.ejb.AutoDeployer"
name="EJB:service=iKuAutoDeployer">    <attribute
name="Deployer">J2EE:service=iKuJ2eeDeployer</attribute>
    <attribute
name="URLs">../deploy-www.iku-netz.de</attribute>
  </mbean>
 
  <mbean code="org.jboss.ejb.AutoDeployer"
name="EJB:service=AutoDeployer">
    <attribute
name="Deployer">J2EE:service=J2eeDeployer</attribute>
    <attribute name="URLs">../deploy</attribute>
  </mbean>

I moved the 'tomcat-test.ear' from 'deploy' to
'deploy-www.iku-netz.de' and this moved the application
from one virtual host to another.

With this patch, we can offer separate deployment
directories for our different projects and can use it
for more than one domain.

The name of the virtual-host is prefixed to the
webContext. This context is checked to start with a '/'
in 'Installer.java' and a slash is prefixed if it is
missing. So what I do is just add the virtual host like
this:

/jboss -> www.iku-netz.de:/jboss

This is checked in 'TomcatEntry' and the virtual host
is handed over to Tomcat if there is one.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=439475&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to