In order for a web client to be able to use initContext.lookup("java:/comp/env/ejb/AdamsFacade"), it has to define an ejb-ref or ejb-local-ref in its web.xml descriptor. If the war is in an ear with the target ejbs this can also specify the ejb-link to complete the binding. Otherwise, the ref must be made using the jboss-web.xml descriptor.
This is standard j2ee stuff.
Great, thanks for info.
One more Q: is there a big performance hit if I initialize my context with the external form "localhost:1099" when it's not necessary?