-
1. Re: Sharing wars between virtual hosts
stevev Jul 17, 2007 3:09 PM (in response to stevev)I think this is actually just a JNDI question. In JBoss, is there a JNDI context for each web context or virtual host, and if so where is it configured?
I've been looking at the JBoss Wiki:
http://wiki.jboss.org/wiki/Wiki.jsp?page=JNDIBindingServiceMgr
and this page looks like it could be the way to go but the documentation is a bit brief. Does anyone know the answer to this?
Thanks,
Steve -
2. Re: Sharing wars between virtual hosts
jaikiran Jul 17, 2007 3:32 PM (in response to stevev)In JBoss, is there a JNDI context for each web context
Are you looking for "env-entry" for each web context, in which case each of the web-context will have the entry in its own java:/comp/env namespace.
More details about env-entry can be found in the dtd of web.xml at http://java.sun.com/dtd/web-app_2_3.dtd:<!-- The env-entry element contains the declaration of a web application's environment entry. The declaration consists of an optional description, the name of the environment entry, and an optional value. If a value is not specified, one must be supplied during deployment. --> <!ELEMENT env-entry (description?, env-entry-name, env-entry-value?, env-entry-type)> <!-- The env-entry-name element contains the name of a web applications's environment entry. The name is a JNDI name relative to the java:comp/env context. The name must be unique within a web application. Example: <env-entry-name>minAmount</env-entry-name> Used in: env-entry --> <!ELEMENT env-entry-name (#PCDATA)>
-
3. Re: Sharing wars between virtual hosts
stevev Jul 17, 2007 3:42 PM (in response to stevev)Thanks for getting back to me. I think what you're describing is a env-entry for a certain web-app that can be defined in web.xml. This would then be the same for all virtual hosts that use this web app.
I'm looking for a env-entry for each virtual host. So that depending on which domain name is used, a different env-entry will be listed in the java:/comp/env namespace.
In Tomcat this can be configured in seperate context.xml fragments under TOMCAT_DIR/conf/Catalina/virtual-host1.com/ and TOMCAT_DIR/conf/Catalina/virtual-host1.com/
Any idea how this can be achieved under JBoss? -
4. Re: Sharing wars between virtual hosts
jaikiran Jul 18, 2007 3:03 PM (in response to stevev)Any idea how this can be achieved under JBoss?
Sorry Steve, i havent done that before and lack knowledge, for answering this.