3.4. Distributed and local EJB semantics

Clients of EJBs interact only with the container’s proxies, not the EJB implementation itself. This applies whatever a client happens to be, even if it is itself an EJB in the same application. Typically, the client locates the proxy that implements the factory interface and makes a create() or find() call on it. This factory proxy then provides the client with a reference to a proxy that implements the business method interface, which the client then uses for all subsequent method calls.

In EJB 1.1, all calls on these proxies were considered to be network (RMI) calls, even when EJBs were located in the same JVM. EJB 2.0 allows for the provision of both remote and local (same JVM) proxies, as will be ...

Get Applied Enterprise JavaBeans™ Technology now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.