users@glassfish.java.net

Re: Call remote EJB3 module from web application.

From: <glassfish_at_javadesktop.org>
Date: Mon, 17 Dec 2007 18:31:33 PST

Hi Bob,

If you deploy these EARs to glassfish, jboss-*.xml files will be ignored. That means the global jndi name of the EJB is not set, and the mapping of ejb-ref to the target EJB's jndi name is not used. You will need to create corresponding sun-ejb-jar.xml and sun-web.xml.

If you deploy it to jboss, I don't see anything wrong here, though there are a couple of minors things. First, your client looks up by global jndi name, so the ejb-ref declared in web.xml is not used. Second, in the <ejb-ref> in jboss-web.xml,

<ejb-ref>
<ejb-ref-name>ejb/UserAdmin/UserBean</ejb-ref-name>
<jndi-name>UserBean</jndi-name>
</ejb-ref>

shouldn't <jndi-name> be ejb/UserAdmin/UserBean, the global jndi-named declared in jboss.xml for the EJB?

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

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