would give you a jndi subcontext (i.e. object of javax.naming.Context type). Looks like a piece of code you've included does not contain the actual ejb home lookup.
As far as I understand "java:comp/env" subcontext is only used when performing lookups from within the enterprise bean (it is a special jndi context where Bean Provider can define constants [<env-entry>], resource managers [<resource-ref>], ejb references [<ejb-ref>] that a particular bean uses). Please correct me if I am wrong.
I have looked at the web.xml extract again and realised that test/myejb does refer to the Enterprise Java Bean and not to the javax.naming.Context. I am sorry for the confusion.
I got mistaken because usually one would use a standard when defining an ejb reference name: 1) context starts with the lower case char 2) actual name starts with the upper case char. Therefore, in our example ejb-ref-name would have test/MyEJB value.
Anyway, I have tried to replicate your problem using JBoss rather than weblogic (I just do not have weblogic ). It works like a dream - recommended lookup (using <ejb-ref-name> defined in web.xml) and a lookup that uses an actual jndi name both return a remote object.
Have you checked that your second application (the one on serverA) got deployed at the time of the lookup with the <ejb-ref-name>?