5.5. Local Interfaces

One of the new features added in the EJB 2.0 specification is local interfaces for session and entity beans. What are local interfaces and when do you use them?

The EJB examples we've presented so far have all had a home interface, remote interface, and bean implementation class. A client accesses an EJB through either its home interface with create() or through its remote interface using a business method. The EJB container intercepts method invocations and, in turn, calls the respective bean implementation method, or, in the case of create() with a stateless session bean, simply grabs a bean instance from the pool (if possible). Each call from the client to the bean is a remote invocation using the Java Remote Method Invocation ...

Get Enterprise JavaBeans™ Component Architecture: Designing and Coding Enterprise Applications 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.