@ejb.bean

Scope: Class

Multiplicity

(0..1): You can use this tag zero or one time in any Java™ source file that implements a javax.ejb.SessionBean, a javax.ejb.EntityBean, or a javax.ejb.MessageDrivenBean..

Purpose

This tag provides information about the EJB. This tag is required. Some parameters are only applicable to certain types of EJBs. If a parameter does not apply to all types of EJBs, the Applicability column specifies the EJB types that the parameter does apply to."
Parameter Type Applicability Description Mandatory
name text   Provides the name of the bean that will be used in the EJB deployment descriptor(ejb-jar.xml). true
description text   A description of the bean. The default description is the first sentence of the class-level Javadoc comment of the bean class. false
display-name text   The display name of the bean. false
small-icon text   The small icon for the bean. false
large-icon text   The large icon for the bean. false
generate boolean   Set it to false if you want the class be excluded from the list of EJBs. This is useful for abstract EJBs from which other EJBs derive. Clearly, abstract EJBs should not be wrongly identified as concrete EJBs in deployment descriptors. The default value is
  • true
false
jndi-name text Remote Session and Entity beans. Provides the JNDI name of the bean that will be used in the vendor-specific deployment descriptors. false
local-jndi-name text Local Session and Entity beans, EJB 2.0 Provides the JNDI name of the bean that will be used in the vendor-specific deployment descriptors. It is the JNDI name for the local EJB. false
view-type text Session and entity beans Indicates what view-type is supported by the bean. You must specify one of the following attributes:
  • local
  • remote
  • both
The default value is
  • remote (EJB 1.1)
  • both (EJB 2.0)
false
type text Session and Entity beans Defines the type of the bean. You must specify one of the following attributes:
  • CMP
  • BMP
  • Stateless
  • Stateful
The default value is
  • CMP (for javax.ejb.EntityBean)
  • Stateless (for javax.ejb.SessionBean)
true
transaction-type text Session and Message-driven beans Defines the transaction-type of the bean. You must specify one of the following attributes:
  • Container
  • Bean
The default value is
  • Container
false
reentrant boolean Entity beans Defines the entity re-entrancy of the bean. The default value is
  • true
false
cmp-version text Entity beans, EJB 2.0 Defines the specification version of the bean for CMP. The default value is
  • 2.x
 
schema text Entity beans, EJB 2.0 Defines the abstract schema name for the bean. false
primkey-field text Entity beans Defines the primary key field for the bean as per specification. false
message-selector text Message-driven beans Defines an optional message-selector for Message-driven beans. false
acknowledge-mode text Message-driven beans Defines the acknowledge-mode for MDB. You must specify one of the following attributes: Auto-acknowledge or Dups-ok-acknowledge. The default value is Auto-acknowledge. false
destination-type text Message-driven beans Defines the type of destination for MDB. You must specify one of the following attributes:
  • javax.jms.Queue
  • javax.jms.Topic
The default value is
  • javax.jms.Queue
false
subscription-durability text Message-driven beans Defines the durability of messages for MDB as per EJB 2.0 spec. You must specify one of the following attributes:
  • Durable
  • NonDurable
The default value is
  • Durable
false
remote-business-interface text Session and Entity beans Defines the remote business interface for the bean. If present, ejb.interface-method tags are not required; instead the remote interface will extend the business interface. The business interface must declare all methods as throwing RemoteException according to the business interface pattern. false
local-business-interface text Session and Entity beans Defines the local business interface for the bean. Functions in a way similar to remote-business-interface, but the interface does not need to declare RemoteException in the throws clause. false
impl-class-name text All EJB Types Provides the fully qualified classname of the bean implementation class of the bean, to be used in the ejb-class element of the ejb-jar.xml deployment descriptor. Its value is used only when the implementation class is not being generated by a subtask (for example,<session/>, <entitycmp/>), since those subtasks have other ways to determine the classname. This parameter is mainly intended to be used where the bean class itself is generated, and additional code is to be added in a subclass. false
Related reference
@ejb.create-method
@ejb.ejb-external-ref
@ejb.ejb-ref
@ejb.env-entry
@ejb.facade
@ejb.facade-method
@ejb.finder
@ejb.home
@ejb.home-method
@ejb.interface
@ejb.interface-method
@ejb.permission
@ejb.persistence
@ejb.persistence (method)
@ejb.pk
@ejb.pk-field
@ejb.relation
@ejb.remote-facade
@ejb.resource-env-ref
@ejb.resource-ref
@ejb.security-identity
@ejb.security-role-ref
@ejb.select
@ejb.session
@ejb.transaction
@ejb.util
@ejb.value-object
@ejb.value-object-method
Terms of use | Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.