Using this code :
private String animalTypeEJBName = "java:comp/env/ejb/AnimalType"; /*
Changed according to your advice */
...
...
...
java.lang.Object animalTypeRef = initial.lookup(animalTypeEJBName); /*
Failing here : NameNotFoundException */
AnimalTypeHome animalTypeHome = (AnimalTypeHome)
PortableRemoteObject.narrow(animalTypeRef, animalTypeClass);
TIA
Glenn
----- Original Message -----
From: "Evan Ireland" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, November 22, 2001 11:07 AM
Subject: Re: Using Local Entity Beans Instead of Remote Entity Beans
> Normally with a local ref you would lookup a name like
"java:comp/env/ejb/...".
>
> Glenn Dickson wrote:
>
> > I get a NameNotFoundException when trying to reference the local entity
> > bean at this line of code
> >
> >
> >
> > java.lang.Object animalTypeRef = initial.lookup("AnimalType");
> >
> >
> >
> >
> >
> > The xml deployment file has the correct declarations for a local entity
> > bean.
> >
> >
> >
> > Should I be using "lookup" ?
> >
> > If anyone can help I would really appreciate it.
> >
> >
> >
> > TIA
> >
> >
> >
> > Glenn
> >
>
>
> --
>
____________________________________________________________________________
___
>
> Evan Ireland Sybase EAServer Engineering
[EMAIL PROTECTED]
> Wellington, New Zealand +64 4
934-5856
>
>
===========================================================================
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".