users@glassfish.java.net

Re: Interop with Glassfish and other application servers

From: <glassfish_at_javadesktop.org>
Date: Fri, 21 Dec 2007 08:05:58 PST

Hi Chris,

Using @EJB(mappedName="xxx") and specifying <ejb-ref><jndi-name> are equivalent. Either or both should work. I just tried it and works for me (servlet on host1, ejb on host2, servlet has @EJB(mappedName="corbaname:iiop:1.2_at_host2:3700#foo.FooRemote")

On a related note, the preferred way is to map it in sun-web.xml to be flexible in deployment. When deploying to a different environment, you just need to change sun-web.xml without changing java code.

-cheng
[Message sent by forum member 'cf126330' (cf126330)]

http://forums.java.net/jive/thread.jspa?messageID=251145