Package javax.ejb

Annotation Type EJB


@Target({TYPE,METHOD,FIELD}) @Retention(RUNTIME) public @interface EJB
Indicates a dependency on the local or remote view of an Enterprise Java Bean.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Holds one of the following interface types of the target EJB : [ Local business interface, Remote business interface, Local Home interface, Remote Home interface ]
    The ejb-name of the Enterprise Java Bean to which this reference is mapped.
     
    The product specific name of the EJB component to which this ejb reference should be mapped.
    The logical name of the ejb reference within the declaring component's (java:comp/env) environment.
  • Element Details

    • name

      String name
      The logical name of the ejb reference within the declaring component's (java:comp/env) environment.
      Default:
      ""
    • description

      String description
      Default:
      ""
    • beanName

      String beanName
      The ejb-name of the Enterprise Java Bean to which this reference is mapped. Only applicable if the target EJB is defined within the same application or stand-alone module as the declaring component.
      Default:
      ""
    • beanInterface

      Class beanInterface
      Holds one of the following interface types of the target EJB : [ Local business interface, Remote business interface, Local Home interface, Remote Home interface ]
      Default:
      java.lang.Object.class
    • mappedName

      String mappedName
      The product specific name of the EJB component to which this ejb reference should be mapped. This mapped name is often a global JNDI name, but may be a name of any form. Application servers are not required to support any particular form or type of mapped name, nor the ability to use mapped names. The mapped name is product-dependent and often installation-dependent. No use of a mapped name is portable.
      Default:
      ""