XML view of the deployment descriptor for an entity bean.
- By Arny Epstein and John Archer
- July 17, 2000
Java PrimerUsing EJB in Real-World Applications
Arny Epstein and John Archer
Listing 1. XML view of the deployment descriptor for an entity bean.
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.
//DTD Enterprise JavaBeans 1.1
//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>EBAccount</ejb-name>
<home>com.examples.bankdemo.EBAccountHome</home>
<remote>com.examples.bankdemo.EBAccountRemote</remote>
<ejb-class>com.examples.bankdemo.EBAccount</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>com.examples.bankdemo.EBAccountPrimaryKey</prim-key-class>
<reentrant>True</reentrant>
<cmp-field>
<field-name>m_account_number</field-name>
</cmp-field>
<cmp-field>
<field-name>m_account_type</field-name>
</cmp-field>
<cmp-field>
<field-name>m_current_balance</field-name>
</cmp-field>
<cmp-field>
<field-name>m_customer_id</field-name>
</cmp-field>
<cmp-field>
<field-name>m_date_opened</field-name>
</cmp-field>
</entity>
</enterprise-beans>
<assembly-descriptor>
<security-role>
<role-name>BankAdmin</role-name>
</security-role>
<method-permission>
<description>BankVerify</description>
<role-name>BankAdmin</role-name>
<method>
<ejb-name>EBAccount</ejb-name>
<method-name>verifyUser</method-name>
</method>
</method-permission>
<container-transaction>
<description>XReq</description>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>