Re: Ejb-ref Difference?
Victor Langelo <[email protected]> Wed, 10 Mar 2004 10:00:00 -0500
| Newsgroups | gmane.comp.java.sun.ejb.general |
|---|---|
| Message-ID | <[email protected]> |
Glenn wrote:
> Hi
>
> What is the difference between these two ejb lookups;
>
> 1. ctx.lookup("someejb");
This looks up the object bound to the global JNDI name someejb.
>
> 2. ctx.lookup("java:comp/env/ejb/someejb");
>
This looks up the object referenced by the ejb-ref named "ejb/someejb"
in the current bean context. This would have been defined in the
deployment descriptor for the bean invoking the lookup method. This
could refer to a bean with global JNDI of xyzbean. It can also be
changed without having to recompile the bean.
--Victor
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[email protected] and include in the body of the message "help".