[jboss-user] [Tomcat, HTTPD, Servlets & JSP] JNDI for virtual hosts
Steve
svangasse at googlemail.com
Thu Jul 19 09:05:06 EDT 2007
Hello,
Does anyone know how to configure a different JNDI namespace for each
virtual host that uses the same WAR in JBoss? This can be done with
stand alone Tomcat using context.xml fragments under
CATALINA_HOME/conf/Catalina/www.site1.com/ROOT.xml
<Context>
<Environment description="Unique Host ID" name="siteId"
type="java.lang.String" value="site1"/>
</Context>
I can then give each virtual host it's own siteId so that it accesses
the correct rows from a shared database.
This doesn't seem to work with Tomcat embedded in JBoss. The closest I
have found so far is jboss-web.xml under WEB-INF inside the WAR, but
there doesn't seem to be a way to set up each virtual host with separate
data. It would also be difficult to add new sites without having to edit
jboss-web.xml and restart/reload.
Does anyone know how this can be achieved?
Thanks,
Steve
More information about the jboss-user
mailing list