Appendix B. Changes from EJB 1.1

   

Local Clients

Prior to EJB 2.0, all clients of an enterprise bean were treated as remote clients. Support for location independence required that pass- by-value semantics always be followed when a bean was accessed through its home and remote interfaces. Even when a session bean made a call to an entity bean running in the same JVM, the call was subjected to much of the overhead associated with a remote call. Any optimizations were vendor-specific, if they existed at all. Because of this drawback, some of the EJB design patterns first adopted were those aimed at reducing the number of calls made to entity beans.

EJB 2.0 introduces support for local clients in addition to remote clients. If a session or entity bean supports other enterprise beans deployed in the same container as clients, those beans can be treated as local clients. Instead of the remote and home interfaces used by remote clients, local clients interact with a bean through its local and local home interfaces. Calls made through these interfaces use pass-by-reference semantics and avoid the overhead of remote calls. Local clients give up location independence and they're tightly coupled to the beans they access, but the performance advantages make up for these limitations whenever remote access by a client isn't needed.

As part of this change to the specification, a new term was introduced to identify the interfaces exposed to clients of an enterprise bean. The local and remote interfaces are collectively known as the component interface .

For more information on local clients, see "Local Versus Remote EJB Clients," p. 45 .



Special Edition Using Enterprise JavaBeans 2.0
Special Edition Using Enterprise JavaBeans 2.0
ISBN: 0789725673
EAN: 2147483647
Year: 2000
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net