If you use the remote-naming approach you need to use the external JNDI name myEjb/TestEjb!formation.ejb.TestEjbRemote.
But I recommend to use the ejb-client approach as the remote-naming is not recommended for EJB invocations as it functionality is restricted.
Thanks Fink for your response but why i can't use global jndi defined in java ee6.
does jboss 7.1.0 implements java ee6?
1 of 1 people found this helpful
Yes AS7 implements JavaEE6.
But the context "java" is only bound to the local server and not available from other JVM's
"But the context "java" is only bound to the local server and not available from other JVM's"
Is this specific to jboss because when using glassfish,i had no problem
If yes ,where preventing remote acces by java: context
From the spec there is no "java:" prefix. I suppose it is glassfish specific that it works and you can use it without java: in glassfish as well.