views:

563

answers:

1

I can look up the remote interface of an EJB3 from a Glassfish 2.1 using the global jndi name. However, as I understand, if this were not a LC module but an EJB (Servlet), I would have an ejb-local-ref entry in its ejb-jar.xml (web.xml).

Is there a place to define Local references for an LC module? Thanks!

A: 

Quoting from the Glassfish EJB FAQ :

The EJB spec only requires local ejb access from within the same application in the same JVM.

and

The EJB Local view is an optimized EJB invocation path that uses call-by-reference semantics. It is only available to web components and ejb components that are part of the same application as the target EJB. That's why ejb-local-ref is not even part of the schema for application-client.xml. To access EJBs from an Application Client or stand-alone java client, you'll need to use either a Remote 3.0 Business interface, a 2.x Home interface, or web services.

The LCM lives outside the application containing the EJB, by definition, so, the answer is no.

When I discovered them, I saw all kinds of interesting applications for LCM's, but as I discovered more and more limitations (the fact that they are GF-specific included) that enthusiasm mostly disappeared.

fvu
Thank you for clarifying this!
ron