Package jakarta.ejb
Annotation Type Init
-
@Target(METHOD) @Retention(RUNTIME) public @interface Init
Designates a method of a session bean that corresponds to acreate<METHOD>
method of an adapted home or local home interface (an interface that adapts an enterprise bean 2.1 or earlier EJBHome or EJBLocalHome client view respectively).The result type of such an
Init
method is required to bevoid
, and its parameter types must be exactly the same as those of the referencedcreate<METHOD>
method(s).An
Init
method is only required to be specified for stateful session beans that provide aRemoteHome
orLocalHome
interface.The name of the adapted
create<METHOD>
method of the home or local home interface must be specified if the adapted interface has more than onecreate<METHOD>
method and the method signatures are not the same.- Since:
- EJB 3.0
- See Also:
LocalHome
,RemoteHome
-
-
Element Detail
-
value
String value
The name of the correspondingcreate<METHOD>
method of the adapted home or local home interface. This value is used to disambiguate the case where there are multiplecreate<METHOD>
methods on an adapted home and/or local home interface. If there are multiplecreate<METHOD>
methods on the adapted interface(s) and no value is specified, thecreate<METHOD>
matching is based on signature only.Note that this value is not required to be specified if there is only a single
create<METHOD>
method even if the name of the method to which theInit
annotation is applied does not match that of thecreate<METHOD>
method.- Returns:
- a
String
object.
- Default:
- ""
-
-