Thanks for your reply.  It is done using Application Assembly Tool of WAS4.0 AE.

Even in the web module, it is working fine when I directly lookup from servlet.
If I use an intermediate class for lookup, it is failing.  When
"java:/comp/env/ejb/XYZ" is changed to "ejb/XYZ", it is working fine in both the
cases(directly from servlet, and from intermediate class.).

Venkat.

Johan Eltes wrote:

> How did you bind the ref to the full jndi name? Using WSAD? Using Assembly
> tool? In general, it works well to export the ear, open it in assembly tool,
> look that all is proper set, and save the ear. Then deploy it on WAS. Early
> versions of WSAD (4.0, 4.0.1) tend to loose the binding information for ejb
> refs in web modules.
>
> /Johan
>
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Venkata Reddy Vajrala
> Sent: den 4 maj 2002 09:06
> To: [EMAIL PROTECTED]
> Subject: lookup problem in WAS
>
> Hi,
>
> I have a problem in using "java:comp/env".
>
> I have an EJB, by name XYZ.  I added this to my applications' EJB module
> and created a EJBReference in my web module.   When I tried to lookup
> for this EJB using the following code, directly from servlet, it is
> working fine.  But when I write the code in a simple java class and
> access it from the servlet, it is not able to find the EJB,
>
> Code:
>
> InitialContext icxTemp = new InitialContext();
> Object objHome =
> PortableRemoteObject.narrow(icxTemp.lookup("java:comp/env/ejb/XYZ"),
> XYZHome.class);
>
> But when I replace "java:comp/env/ejb/XYZ" with "ejb/XYZ", which is the
> actual JNDI name of the XYZ EJB, it is working fine in both the cases.
>
> What could be the reason?  Do I need to pass any parameters to
> InitialContext constructor?  If yes, why?  Any ideas?
>
> thanks in advance,
>
> Venkat.
>
> ===========================================================================
> 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".

Reply via email to