This is coming from the EJB 1.1 spec:
5.9 Type narrowing
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.
Note: Programs using the cast operator for narrowing the remote and home interfaces
are likely to fail
if the Container implementation uses RMI-IIOP as the underlying communication
transport.
----- Original Message -----
From: "Steve Holder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 15, 2000 1:53 PM
Subject: Re: JSP-EJB problem.
> When and why should PortableRemoteObject.narrow() be used vs. a standard
> cast? I've noticed that in the Monson-Haefal book, he uses standard casts
> after doing JNDI lookups. That's the way we've been doing things here, and
> it seems to work fine (though we haven't actually deployed any ejbs to
> production servers, yet). Most other code snippets I've seen seem to use
> .narrow(), but I haven't been able to find any explanation for why... all
> the javadocs say for .narrow() is "Checks to ensure that an object of a
> remote or abstract interface type can be cast to a desired type.", but we
> seem to get the same effect by just trying to cast normally. Is there some
> advantage to using .narrow() that I'm not aware of?
>
> Steve Holder
>
>
===========================================================================
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".