The deployment descriptor has the name ejb-jar.xml . The XML tags in the deployment descriptor specify the following information for an entity EJB:
The following sections provide the definition and usage for each of these XML tags. EJB Name TagThe EJB name is the unique name that identifies the EJB. This is the name that is used by the client to locate the entity EJB through the Java Naming and Directory Interface (JNDI). The session bean client must look up the home interface of the entity EJB using JNDI. This name is specified in the deployment descriptor file and is bound to the corresponding home interface by WebLogic Server in the JNDI tree during deployment of the EJB. The XML tag for the EJB name is <ejb-name> EntityBeanEJB </ejb-name> Additional XML Tags in the Deployment DescriptorIn addition to the EJB name, the deployment descriptor specifies the names of the home interface, remote interface, EJB class, and persistence type. In the case of a CMP entity bean, the container-managed fields are also specified. A brief description of the XML tags with a sample of the tag follows . Examples of complete deployment descriptors are provided in "Creating the BMP Style Deployment Descriptor" and "Creating the CMP Style Deployment Descriptor" later in this chapter. EJB Home Interface TagThe XML tag for the EJB home interface is <home>package_name.EntityBeanHome</home> EJB Remote Interface TagThe XML tag for the EJB remote interface is <remote>package_name.EntityBean</remote> EJB Class TagThe XML tag for the EJB class is <ejb-class>package_name.EntityBeanEJB</ejb-class> Persistence Type TagThe XML tag for the CMP persistence type is <persistence-type>Container</persistence-type> The XML tag for the BMP persistence type is <persistence-type>Bean</persistence-type> CMP Field TagsThe XML tags for the CMP fields are <cmp-field> <field-name> field1_name </field-name> </cmp-field> EJB Primary Key FieldThe XML tag for the EJB primary key field is <primkey-field> prim_key_field_name </primkey-field> When using CMP, the primary key must be a cmp-field : <cmp-field> <field-name>myPrimaryKey</field-name> </cmp-field> <primkey-field>myPrimaryKey</primkey-field> Query TagThe XML tag for the query is <query> <description> brief description </description> <query-method> <method-name> queryMethodName </method-name> <method-params> <method-param> first_param_type </method-param> <method-param> second_param_type </method-param> <method-params> </query-method> </query> |