Providing special conversion methods between an EJB's remote and local
interface was looked at carefully and rejected.
The problem as Joel noted is that the scope within which such a
conversion would be allowed is not clearly defined.
It would be difficult to write portable applications which relied on
such conversions and it would expose implementation details that
shouldn't be exposed.
The current model is that the only thing that links a 'remote' service
to its 'local' form is its primary key. An EJB doing the 'conversion'
must have gotten its hands on a local home that it thinks provides the
local service. There is no way for a client to depend on the fact that
an EJB happens to implement both a remote and local interface.
So, while this may not be as efficient as a specialized conversion it
avoids all the problems that a specialized conversion would introduce.
While not having such conversions seems at first glance to be a
weakness, I believe it will turn out to be a strength of the current
design.
-- Mark
Joel Riedesel wrote:
>
> This discussion of asking for an easy way to get the
> local object from a remote object sounds to me identical
> to the discussion as it happend on the RMI list way back
> when.
>
> And I recall that there was reason why the RMI folk didn't want
> to allow that capability (either security or ensuring state).
>
> I think that EJB local and remote objects are (or may be)
> directly related to RMI local and remote objects and end up, therefore,
> having the same issue when asking for the local object from
> the remote object.
>
> I'm sorry I can't be of further help, but I think that it may be worth
> pursuing the reason the RMI folk didn't allow this before going
> down the same road in the EJB world.
>
> Joel
>
> ----- Original Message -----
> From: "Cedric Beust" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, May 15, 2001 10:09 AM
> Subject: Re: EJB 2.0: Local-Remote Intrfc Conversion
>
> > > From: A mailing list for Enterprise JavaBeans development
> > > [mailto:[EMAIL PROTECTED]]On Behalf Of Richard Monson-Haefel
> >
> > > We need some mechanism for converting from the remote to local
> > > references and visa versa.
> >
> > Is it really needed?
> >
> > If you are a client to the EJB, you obviously don't have access to its
> local
> > interface.
> >
> > From the bean perspective, looking up the local interface of another EJB
> is
> > a simple JNDI look-up, or even simpler if the other EJB is ejb-ref'ed.
> >
> > It doesn't make much sense to me, but maybe I'm missing something.
> >
> > Also, for this to work, the EJB needs to have both a local and remote
> > interface defined, which I don't believe will be a prevalent situation.
> > Actually, this opens up an interesting question:
> >
> > What do you think will be the break down in terms of percentage for:
> >
> > - Local only EJB's
> > - Remote only EJB's
> > - Both Local and Remote EJB's
> >
> > ?
> >
> > --
> > Cedric
> >
> >
> ===========================================================================
> > 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".
===========================================================================
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".