You might need to narrow a remote interfaces if you use
an entity bean finder that returns a collection.
Dave Peterson wrote:
>
> Perhaps I'm wrong but doesn't the EJB v1.1 spec, specifically section
> 8.9, state:
>
> 'A client program that is intended to be interoperable with all
> compliant EJB container implementations must use the
> javax.rmi.PortableRemoteObject.narrow(...) method to perform
> type-narrowing of the client-side representations of the home AND REMOTE
> interface.'
> (emphasis mine, and any typos are also mine.)
>
> I take this to mean that narrow() is also required when retrieving a
> remote interface from the home. Has this changed in EJB v2.0? Is it
> different than EJB v1.0? I dunno the answers to those two questions.
>
> --
> Dave Peterson
> Infoware, Inc.
>
> Dan Hinojosa wrote:
> >
> > Try this ....
> >
> > Change:
> > // Create a new Cr and narrow the reference.
> > Cr cr = (Cr)PortableRemoteObject.narrow(home.create("Tag"), Cr.class);
> >
> > to this:
> > // Create a new Cr and narrow the reference.
> > Cr cr = home.create("Tag");
> >
> > Narrow is only necessary when you are retrieving an Object from the
> > InitialContext. Your home should already return a Cr type without the
> > need to do anything else.
> >
> > Hope that helps
> >
> > --
> >
> > Dan Hinojosa
> > Java & Lotus Notes Consultant
> > Java Certified Programmer
> >
> > P.O. Box 4675
> > Albuquerque, NM 87196-4675
> > Telephone: (505) 262-0911
> > Email: [EMAIL PROTECTED]
> > WWW: http://www.digitalpriest.com
> >
> > ===========================================================================
> > 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".
--
________________________________________________________________________________
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".