This issue of the container optimizing my call from serializing the object
(non-modifyable) to passing it by reference is somewhat disturbing to me if
it is non-deterministic, as I would think it might be in a cluster where the
two objects might be remote on one invocation and local on another. Not
that it isn't good programming practice to avoid modifying 'in' parameters,
but it just wrankles me a bit for some reason to have the container 'helping
me out' like this.
I would also think with the session facade pattern that one would tend to
use the local interface and only occasionally use a remote interface for an
entity bean. Am I missing some big advantage of the remote interface?
Cheers
-----Original Message-----
From: Krishnan Subramanian [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 15, 2001 12:08 PM
To: [EMAIL PROTECTED]
Subject: Re: EJB 2.0: Local-Remote Intrfc Conversion
Dan, (& Richard)
a normal jndi lookup of an EJB from another EJB
*may not* guarantee that the lookup will return
a reference to an EJB in the same container as
the caller (or lookuper ;) . this can happen when
when you've clustered your ejb server and lookups
return references based on load balancing/round
robin algorithms - unless you've used ejb links/references
I could go into some detail here, but for a slightly
more detailed explanation - you could refer to
page 20 - 'EJB Design Patterns' by yours truly at
http://www.borland.com/appserver/papers
Richard does bring up an interesting point - on
how to convert between remote/local interfaces.
On another note, I am actually wondering about
the real world benefits of local interfaces - as
quite a few ejb vendors (mostly with a corba
infrastructure i might add) detect & optimize
co-located calls. of course - i can see some
advantages - like local interfaces for entity beans
but the same could be accomplished by
- having the facade pattern (session wrap entity)
and making session beans the only point of
access for clients.
- having T attribute "Mandatory" for entity beans
preventing clients from calling EBs directly (unless
clients start up a transaction which should anyways
be discouraged)
- not distributing entity bean classes/stubs to client
side application developers
-krish
> Hi Richard,
>
> What's the disadvantage of using the existing JNDI lookup
> mechanism?
>
> -Dan
===========================================================================
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".