Annotation Type Local
-
@Target(TYPE) @Retention(RUNTIME) public @interface Local
Declares the local business interface(s) for a session bean.The
Localannotation is applied to the session bean class or local business interface to designate a local interface of the bean.When used on the bean class, declares the local business interface(s) for a session bean. When used on an interface, designates that interface as a local business interface. In this case, no
valueelement should be provided.The
Localannotation applies only to session beans and their interfaces.Use of the
Localannotation is required when the bean class exposes one or more local business interface and any of the following is true:- the bean class does not implement its business interfaces
- the bean exposes a no-interface view
- the bean class implements more than one interface and at least one of the interfaces is explicitly designated as
a business interface by using the
LocalorRemoteannotation on the interface, or in the deployment descriptor
The following interfaces are excluded when determining whether the bean class has business interfaces:
java.io.Serializable;java.io.Externalizable; any of the interfaces defined injakarta.ejb.- Since:
- EJB 3.0
-
-
Element Detail
-
value
Class[] value
Specifies the local business interface(s) of the bean. Thevalueelement is specified only when the annotation is applied to the bean class. It is only required to be specified if any of the following is true:- the bean class does not implement its local business interface
- at least one of the implemented interfaces is designated as a remote interface
- the bean class implements two or more interfaces and at least one of the implemented interfaces is designated as
local business interfaces using
Localannotation on the interface, and at least one other interface (excludingjava.io.Serializable,java.io.Externalizable, and any of the interfaces defined by thejakarta.ejbpackage) has no designation.
- Returns:
- an array of
Classobjects.
- Default:
- {}
-
-