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".