users@glassfish.java.net

Re: an EJB2.1 stateless session bean with remote and local interface -- how

From: <glassfish_at_javadesktop.org>
Date: Fri, 11 Jan 2008 20:46:47 PST

Hi Marina,

The Java EE 5 specification says:
[i]
EE.5.5.2Application Assembler’s Responsibilities
The Application Assembler can use the ejb-link element in the deployment descriptor to link an EJB reference to a target enterprise bean.
The Application Assembler specifies the link to an enterprise bean as follows:
•The Application Assembler uses the optional ejb-link element of the ejb-ref or ejb-local-ref element of the referencing application component. (...) The target enterprise bean can be in any ejb-jar file in the same Java EE application as the referencing application component.[/i]

So, package your J2EE application client and EJB application jars in one EAR and the client can refer to the EJBs in the ejb-jar using ejb-ref's ejb-link tag.

Note that the application-client.xml's DTD/schema supports the ejb-link tag. If you can't use it (an application client has no local EJB beans, it only does remote lookups), why would it be there?

#This is from (my interpretation of) the spec's point of view and does not answer the original question whether it is possible on GlassFish, of course.
[Message sent by forum member 'dkoper' (dkoper)]

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