Woops...
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>?