Hello Manne,

That's right, that is the way we recommend it to be done. Just want to clarify
something though. It is possible to lookup EJBs in another application. To do
so, use the parent attribute when defining the application in server.xml and the
children application's local context will extend the one of the parent, making
it possible to use EJBs from another application.

Regards,
Karl Avedal

Manne Fagerlind wrote:

> I used the JNDI name "java:comp/env/ejb/MyBean" yesterday and it worked fine
> (older version of Orion; hope they haven't changed it). It seems that the
> object performing the lookup must be located inside the same enterprise
> application (i.e. <application>-entry in server.xml) for this to work,
> though.
>
> /Manne
>
> -----Original Message-----
> From: Gary Shea [mailto:[EMAIL PROTECTED]]
> Sent: 09 March 2001 20:57
> To: [EMAIL PROTECTED]
> Subject: Re: Inconsistent EJB JNDI Locations
>
> On Thu, 8 Mar 2001, Peter Pontbriand wrote:
> > Yes, this is what works for us. Assuming that the Entity EJB is deployed
> > with <ejb-name>MyBean</ejb-name> and that the Session EJB's deployment
> > descriptor has an <ejb-ref-name>ejb/MyBean</ejb-ref-name>, the home
> > interface for MyBean is supposed to be found with
> > 'lookup("java:comp/env/ejb/MyBean")'. Unfortunately, this doesn't work,
> but
> > rather MyBean is found with 'lookup("MyBean")'.
>
> Recently I was looking at the spec while trying to figure out why
> Orion's JNDI setup isn't like the examples in the EJB books.  Turns
> out that the java:comp/env/{jms,ejb,...} locations are 'recommended',
> not mandatory.  Given that the non-Context contents of the env/
> directory must be String objects, it doesn't surprise me that the
> Orion folks decided it was tacky to put objects underneath a
> directory that's supposed to hold strings.  Also, I noticed when
> attempting to create objects below the env/ directory using the
> JNDI api, they somehow get turned into strings!  I'm a little unclear
> on whether this really happened or if I was doing something stupid,
> but it's what I think I saw!
>
> Cheers,
>
>         Gary


Reply via email to