When you acess ejb from another then you have to use ejb-ref and ejb-link
attributes of the ejb-jar.xml. Please see deployment descriptor chapter of
the specification.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Warm Regards
Ashwani Kalra
Sr. Member Dev. Staff
Aithent Technologies(P) Ltd.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Ian McCallion
Sent: Tuesday, June 19, 2001 5:45 PM
To: [EMAIL PROTECTED]
Subject: Re: JNDI lookup failing in EJB
Ankur Jain wrote:
>
> Hi hemant,
> com.oneloyalty.ejb.SessionDocHome is the JNDI name. The path is
> correct because when I do a lookup for the same from a normal class file,
> it goes through fine..
> Do I need to specify InitialContextFactory and the URL_Provider etc
> etc..
No you don't - it doesn't work that way for EJB-to-EJB calls. The EJBs of a
jar
file have private JNDI contexts that are created from information in the
assembly descriptor. There is no global JNDI context that applies to the
whole
server.
In the case of looking up other EJBs, it is the assembly descriptor's
ejb-refs
and ejb-links that are used.
BTW, I would not recommend using long names for lookup purposes. The idea
behind
including EJB-to-EJB links in application assembly is that lookups can be
done
to simple friendly names that reflect the purpose or role of the called EJB
and
isolate the calling EJBs from its implementation.
cheers... Ian
========================================
Ian McCallion
Alexis Systems Limited
Romsey, UK
========================================
===========================================================================
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".
===========================================================================
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".