A local client has these characteristics:
It must run in the same JVM as the enterprise bean it accesses.
It can be a web component or another enterprise bean.
To the local client, the location of the enterprise bean it accesses is not transparent.
The local business interface defines the bean’s business and life cycle methods. If the bean’s business interface is not decorated with @Local or @Remote, and the bean class does not specify the interface using @Local or @Remote, the business interface is by default a local interface. To build an enterprise bean that allows only local access, you may, but are not required to do one of the following:
Annotate the business interface of the enterprise bean as a @Local interface. For example:
@Local public interface InterfaceName { ... }
Specify the interface by decorating the bean class with @Local and specify the interface name. For example:
@Local(InterfaceName.class) public class BeanName implements InterfaceName { ... }