Jon,

Actually my question was not about requiring the PRO
(PortableRemoteObject) narrow but rather the lookup
itself.

In EJB 1.1, defining ejb-links between EJBs implied that you
would do something along the lines of a
"jndiContext.lookup("java:comp/env/ejb/SomeHomeName"
and exactly the same is required for a lookup of
a *local* home interface in EJB 2.0. But my question
was why would you want to 'lookup a local home interface'
(using ejb-links again)?

Wouldn't something instead along the lines of
"LocalHomeClass.getReference()" be a better idea?
Another argument for something along the above lines
would be that local and remote interfaces are not
interchangeable and the fact that you cannot 'convert'
one to the other. So in fact, they are fundamentally
different, and behave differently as well (pass by
reference et al).

-krish

----- Original Message -----
From: "Jon Ferguson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, July 04, 2001 8:54 AM
Subject: Re: local interfaces & ejb-links


> Krish,
>
> That's not quite right.  PortableRemoteObject.narrow was introduced as a
> portability means for running over IIOP.  It's sort of CORBA's syntactical
> contribution to beans.  When running over JRMP this was not a problem.
>
> PortableRemoteObject.narrow Does not do a lookup for you.. but rather
> enables you to safely cast your remote proxy to the appropriate type.  It's
> merely a safe cast.  Local proxies do not need to be cast this way... but
> you still have to get hold of them, so ejb-links are not redundant.
>
> Ejb-links enable you to specify the home name of the beans you want to
> lookup (from the same container) at deployment time using the deployment
> descriptor.. rather than hardcoding the required information in the bean
> doing the lookup (or store this as part of its bean state).  Of course, the
> only way to work with references to objects in EJB is via the EjbObject..
> eg. you never have a direct reference to the back-end.  If you don't work
> with an EjbObject then the only way to get an object is by value through
> serialization and those objects are not EJBs.
>
> All the best,
>
> Jon
>
> ************************
> Jon Ferguson
> ObjectTalk
> Scotland
> email: [EMAIL PROTECTED]
> ************************

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

Reply via email to