Actually, it's even stranger... but I've really narrowed down the problem.
Let me start again:

I didn't post my full server.xml:

      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
        <Alias>dev.beyondvital.com</Alias>
        <Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
      </Host>
        <Host name="beyondvital.com"  appBase="static_host"
            unpackWARs="true" autoDeploy="true">
        <Alias>beyondvital.com</Alias>
        <Alias>www.beyondvital.com</Alias>

        <Context docBase="beyondvital-static-web" path="/"
reloadable="false" />
        <Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

      </Host>

I have two wars, beyondvital-jsf which uses EJB and goes into webapps.
beyondvital-static-web goes into static_host and has no EJBs. Notice how I
use a context directive to route any traffic going to "/" to
beyondvital-static-web on the static_host virtualhost.

So, in the state I just described: Two wars, with different names, on
different virtual hosts, everything runs just fine.

If you rename beyondvital-jsf to ROOT.war and toss it to webapps, EJB
injection starts failing completely.

It's like TomEE uses the context root to figure out the scope of injections,
but isn't taking into account the virtual host where the app is running.




--
View this message in context: 
http://openejb.979440.n4.nabble.com/All-sorts-of-problems-deploying-using-multiple-virtualhosts-tp4657267p4657274.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to