Some RMI implementations use the native Java JRMIP (or
something like that) and some use IIOP. The former
allowed a simple cast from Object to your Home, but
IIOP does not support the simple Java caset and so it
requires the call to narrow which essentially
unmarshalling an IIOP stream to your desired class.
That's the general idea, though I am a little fuzzy on
the details.
//Nicholas
--- Craig Herder <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am new to EJB. Could someone explain the
> following statement(s) in terms
> of why
> I need to typecast a generic object into the home
> interface type, using the
> narrow
> method? What's going on behind the scene here?
>
> Object boundObject =
> context.lookup("java:comp/env/ejb/HelloHome");
> helloHome = (HelloHome)
> PortableRemoteObject.narrow(boundObject,
> HelloHome.class);
>
> TIA,
>
> Craig Herder
>
>
===========================================================================
> 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".
>
=====
Nicholas Whitehead
Home: (973) 377 9335
Cell: (973) 615 9646
[EMAIL PROTECTED]
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.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".