ne of the most common complaints about EJB architectures is that they are too resource-intensive, both in terms of memory consumption and response time. Memory consumption is directly related to the container provider and the architectural decisions made for the system. The EJB 2.0 spec doesn't address such issues. It does, however, provide a means of reducing the response time for a request that involves interaction between multiple beans within the same container.
The 1.0 and 1.1 specifications defined only one way to reference one enterprise bean from anotherthrough the bean's remote interface. If both beans are in the same container, then this network round-trip is unnecessary. The 2.0 specification defines a new type of enterprise bean reference to avoid this problemthe local reference.
How can I reduce the unnecessary cost imposed when referencing one enterprise bean from another enterprise bean located in the same container?
Use EJB 2.0 Local References.
Overview:Two kinds of references
Specifying a local reference for a bean
Creating a local interface and accessing a bean with it