ejb@glassfish.java.net

EJB FAQ

From: Pavel Rábek <paul2003_at_centrum.cz>
Date: Thu, 04 May 2006 18:43:48 +0200

Hello,
I'm sending two follow-up questions for EJB FAQ.

My first question concerning Local EJB Access:
I'm able to get reference to Local interface of session bean through @EJB injection.
But what about if I want to get this reference in run-time? (I mean some kind of lookup).
Lookup doesn't work as I tried and read in EJB FAQ: "global JNDI names only apply
to Session/Entity beans that have some kind of Remote interface"

My second question concerns EJB2 lookup:
How can I use @EJB annotation to inject EJB2 session bean?
I'm able to lookup EJB2 bean via old style lookup but not via @EJB...

Thanks,
Paul