Hi Krishnan,
The EJB 2.0 pfd2 introduces a new tag "ejb-local-ref" to reference ( java
contextual look ups) local beans. For beans which do not expose a local
interface "ejb-refs" are used. In my opnion this is required for two
reasons:
1) When assembling an application there will be times when a java contextual
lookup will be required on a bean which exposes only remote interfaces
2) Backward compatibility and interoperability with EJB 1.1 bean.
In such cases the only over head would be pass by value since most
containers do RMI Invocation optimizations if co -located in the same VM.
Amit Khanna
(Pramati Technologies).
----- Original Message -----
From: Krishnan Subramanian <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 02, 2001 9:19 PM
Subject: local interfaces & ejb-links
> Hi all,
>
> I was going through the EJB 2.0 pfd 2 and was wondering about
> the section which mentions that a remote interface lookup will
> require a PortableRemoteObject.narrow while the a local interface
> lookup can be just cast (normal java cast) to the home interface.
>
> But now - I have the feeling that ejb-links are redundant. The purpose
> of an ejb-link was to establish fast, easy co-located lookups between
> EJBs in the same jvm - which is exactly what local interfaces are
> supposed to achieve - but with supposedly less overhead plus the
> ability to pass objects by reference instead of by value. But it seems
> like now ejb-links themselves are now used to look up local home
> interfaces.
>
> <spec>
> Context initialContext = new InitialContext();
> CartHome cartHome = (CartHome)
> initialContext.lookup("java:comp/env/ejb/cart");
> </spec>
>
> Comments on why this seems to be superfluous? Or rather if it
> is so (as I believe)? And what is the role of ejb-links w.r.t remote
> and local interfaces in PFD2?
>
> -krish
>
>
===========================================================================
> 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".