users@glassfish.java.net

Re: Help with sun-ejb-jar.xml setup for Remote EJB reference syntax

From: <glassfish_at_javadesktop.org>
Date: Thu, 14 Jun 2007 15:08:57 PDT

The key issue is which component is the *client* of the Remote EJB. If the client is itself an
EJB component then you would map its ejb-ref using sun-ejb-jar.xml. Every EJB has an
ejb-name. Unlike web components, each EJB component has its own private component
environment. That's why the *-ref mappings in sun-ejb-jar.xml have to made within the scope
of a particular ejb-name. The ejb-name name you care about in this case is the ejb-name
of the client component that contains the ejb-ref dependency, not the ejb-name of the Remote
EJB.

If the client component is an EJB and it uses an ejb-jar.xml, its ejb-name is specified
there. If component-defining annotations are used instead, the ejb-name can be specified
using the name() attribute of @Stateless/_at_Stateful/_at_MessageDriven. Otherwise, it defaults
to the unqualified name of the bean class.
[Message sent by forum member 'ksak' (ksak)]

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