EJB.16.2 Bean Provider s Responsibilities


EJB.16.2 Bean Provider's Responsibilities

The bean provider is responsible for providing the structural information for each enterprise bean in the deployment descriptor.

The bean provider must use the enterprise-beans element to list all the enterprise beans in the EJB JAR file.

The bean provider must provide the following information for each enterprise bean:

  • Enterprise bean's name . The bean provider must assign a logical name to each enterprise bean in the EJB JAR file. There is no architected relationship between this name and the JNDI API name that the deployer will assign to the enterprise bean. The bean provider specifies the enterprise bean's name in the ejb-name element.

  • Enterprise bean's class. The bean provider must specify the fully-qualified name of the class in the Java programming language that implements the enterprise bean's business methods . The bean provider specifies the enterprise bean's class name in the ejb-class element.

  • Enterprise bean's home interfaces. The bean provider must specify the fully-qualified name of the enterprise bean's home interface in the home element.

  • Enterprise bean's remote interfaces. The bean provider must specify the fully-qualified name of the enterprise bean's remote interface in the remote element.

  • Enterprise bean's type. The enterprise bean's types are session and entity. The bean provider must use the appropriate session or entity element to declare the enterprise bean's structural information.

  • Reentrancy indication. The bean provider must specify whether an entity bean is reentrant or not. Session beans are never reentrant.

  • Session bean's state management type. If the enterprise bean is a session bean, the bean provider must use the session-type element to declare whether the session bean is stateful or stateless.

  • Session bean's transaction demarcation type. If the enterprise bean is a session bean, the bean provider must use the transaction-type element to declare whether transaction demarcation is performed by the enterprise bean or by the container.

  • Entity bean's persistence management. If the enterprise bean is an entity bean, the bean provider must use the persistence-type element to declare whether persistence management is performed by the enterprise bean or by the container.

  • Entity bean's primary key class. If the enterprise bean is an entity bean, the bean provider specifies the fully-qualified name of the entity bean's primary key class in the prim-key-class element. The bean provider must specify the primary key class for an entity with bean-managed persistence, and may (but is not required to) specify the primary key class for an entity with container-managed persistence.

  • Container-managed fields. If the enterprise bean is an entity bean with container-managed persistence, the bean provider must specify the container-managed fields using the cmp-fields elements.

  • Environment entries. The bean provider must declare all the enterprise bean's environment entries as specified in Section EJB.14.2.1.

  • Resource manager connection factory references. The bean provider must declare all the enterprise bean's resource manager connection factory references as specified in Section EJB.14.4.1.

  • EJB references. The bean provider must declare all the enterprise bean's references to the homes of other enterprise beans as specified in Section EJB.14.3.1.

  • Security role references. The bean provider must declare all the enterprise bean's references to security roles as specified in Section EJB.15.2.5.3.

The deployment descriptor produced by the bean provider must be well formed in the XML sense, and valid with respect to the DTD in Section EJB.16.5.

The content of the deployment descriptor must conform to the semantics rules specified in the DTD comments and elsewhere in this specification. The deployment descriptor must refer to the DTD using the following statement:

 <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.  //DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb- jar_1_1.dtd"> 


Java 2 Platform, Enterprise Edition. Platform and Component Specifications
Java 2 Platform, Enterprise Edition: Platform and Component Specifications
ISBN: 0201704560
EAN: 2147483647
Year: 2000
Pages: 399

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net