On Jan 16, 2006, at 11:30 AM, Jeff Genender wrote:



David Jencks wrote:

On Jan 16, 2006, at 9:06 AM, Aaron Mulder wrote:

OK, it strikes me as pretty silly that you can't configure virtual
hosts in a common way for web applications, but you can for EJBs
exposed as web services!

I suspect the implementation for ejb web services re tomcat is wrong.

Could you please point out where it is wrong?  If no VH is set on the
EJB side, then it is attached to the default host. If a VH is set, then TC looks it up to verify its existence and attaches the context to that host. See lines 325-337 of the TomcatContainer. I don't see where this
is incorrect.  Did I miss something here?

I would like to revise my comment to say that Aaron's description of what the tomcat implementation does is wrong: the tomcat implementation ignores all but the first "virtual host" name.

To clarify, the tomcat and jetty interpretations of the multiple virtual host elements in an ejb web service plan are completely unrelated:
-- jetty: the vh elements are actually used as virtual host names
-- tomcat: the first vh element if present is used to find a tomcat host object, whose name has nothing to do with any aliases/virtual host names.

I think that this is sufficiently misleading that we should consider providing separate tomcat and jetty configurations for this. However, I fear this will be extremely unpleasant to implement. The first time around I couldn't figure out any way to do this properly, which is why we have the current misleading and ugly hack.

Thanks
david jencks




That should mean we have a common configuration scheme if you want to
bind a web app to a single virtual host.  If you want to bind to
multiple virtual hosts, you must either use the extended
Jetty-specific syntax, or manually configure a Host GBean for Tomcat
that binds to those IPs and then put the name of that GBean in the
virtual-host element.

Most importantly, if you do no extra configuration but put
"<virtual-host>virtual.host.com</virtual-host>" in the geronimo-web
plan then it will do what you expect, regardless of the web container
in question.

I think it will only simplify matters when each web app uses a single
virtual host that no other web app uses.  As soon as there is any
overlap it produces unstartable apps and unpredictable behavior.

Would that work for everyone?

Definitely not, sorry


I think after rethinking this I have to agree with DJ on this one.

Jeff

Reply via email to