<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>

<ejb-jar>
  <display-name>Customer</display-name>
  <enterprise-beans>
    <entity>
      <display-name>CustomerBean</display-name>
      <ejb-name>CustomerBean</ejb-name>
      <home>headfirst.CustomerHome</home>
      <remote>headfirst.Customer</remote>
      <ejb-class>headfirst.CustomerBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      <reentrant>False</reentrant>
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>CustomerSchema</abstract-schema-name>
      <cmp-field>
        <description>no description</description>
        <field-name>limit</field-name>
      </cmp-field>
      <cmp-field>
        <description>no description</description>
        <field-name>pK</field-name>
      </cmp-field>
      <cmp-field>
        <description>no description</description>
        <field-name>custAddress</field-name>
      </cmp-field>
      <cmp-field>
        <description>no description</description>
        <field-name>last</field-name>
      </cmp-field>
      <cmp-field>
        <description>no description</description>
        <field-name>first</field-name>
      </cmp-field>
      <primkey-field>limit</primkey-field>
      <env-entry>
        <description>Customers who demonstrate sophistication and intelligence in their purchasing decisions are entitled to a discount. Of course, you can set it to .0 if you want, but as the Bean Provider who wrote this logic, I urge you to consider the default value I supplied, .05. Shouldn't your customers be rewarded for good taste?</description>
        <env-entry-name>smartCustomerDiscount</env-entry-name>
        <env-entry-type>java.lang.Double</env-entry-type>
        <env-entry-value>0.05</env-entry-value>
      </env-entry>
      <ejb-ref>
        <ejb-ref-name>AdviceGiver</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>headfirst.AdviceHome</home>
        <remote>headfirst.Advice</remote>
      </ejb-ref>
      <security-identity>
        <description></description>
        <use-caller-identity></use-caller-identity>
      </security-identity>
      <resource-ref>
        <res-ref-name>CustomberDB</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
      </resource-ref>
    </entity>
  </enterprise-beans>
  <assembly-descriptor>
    <security-role>
      <description>People who have access to all methods</description>
      <role-name>Manager</role-name>
    </security-role>
    <security-role>
      <description>Everyone who is not a manager, and who sits, even as you read this, slaving away in a cramped cubicle.</description>
      <role-name>Employee</role-name>
    </security-role>
    <method-permission>
      <role-name>Manager</role-name>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>setLastName</method-name>
        <method-params>
          <method-param>java.lang.String</method-param>
        </method-params>
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>setCreditLimit</method-name>
        <method-params />
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>setCustomerAddress</method-name>
        <method-params>
          <method-param>java.lang.String</method-param>
        </method-params>
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getHandle</method-name>
        <method-params />
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getPrimaryKey</method-name>
        <method-params />
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getCreditLimit</method-name>
        <method-params />
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getLastName</method-name>
        <method-params />
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>remove</method-name>
        <method-params />
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getCustomerAddress</method-name>
        <method-params />
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getFirstName</method-name>
        <method-params />
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>isIdentical</method-name>
        <method-params>
          <method-param>javax.ejb.EJBObject</method-param>
        </method-params>
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>setFirstName</method-name>
        <method-params>
          <method-param>java.lang.String</method-param>
        </method-params>
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getEJBHome</method-name>
        <method-params />
      </method>
    </method-permission>
    <method-permission>
      <role-name>Employee</role-name>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getCustomerAddress</method-name>
        <method-params />
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>isIdentical</method-name>
        <method-params>
          <method-param>javax.ejb.EJBObject</method-param>
        </method-params>
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getPrimaryKey</method-name>
        <method-params />
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getLastName</method-name>
        <method-params />
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getCreditLimit</method-name>
        <method-params />
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getEJBHome</method-name>
        <method-params />
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getFirstName</method-name>
        <method-params />
      </method>
    </method-permission>
    <method-permission>
      <unchecked />
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Home</method-intf>
        <method-name>getEJBMetaData</method-name>
        <method-params />
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Home</method-intf>
        <method-name>remove</method-name>
        <method-params>
          <method-param>java.lang.Object</method-param>
        </method-params>
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Home</method-intf>
        <method-name>getHomeHandle</method-name>
        <method-params />
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Home</method-intf>
        <method-name>remove</method-name>
        <method-params>
          <method-param>javax.ejb.Handle</method-param>
        </method-params>
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Home</method-intf>
        <method-name>findByPrimaryKey</method-name>
        <method-params>
          <method-param>java.lang.String</method-param>
        </method-params>
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Home</method-intf>
        <method-name>findByCity</method-name>
        <method-params>
          <method-param>java.lang.String</method-param>
        </method-params>
      </method>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Home</method-intf>
        <method-name>create</method-name>
        <method-params>
          <method-param>java.lang.String</method-param>
          <method-param>java.lang.String</method-param>
        </method-params>
      </method>
    </method-permission>
    <container-transaction>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>setLastName</method-name>
        <method-params>
          <method-param>java.lang.String</method-param>
        </method-params>
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>setCreditLimit</method-name>
        <method-params />
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>setCustomerAddress</method-name>
        <method-params>
          <method-param>java.lang.String</method-param>
        </method-params>
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getCreditLimit</method-name>
        <method-params />
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getLastName</method-name>
        <method-params />
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getFirstName</method-name>
        <method-params />
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>remove</method-name>
        <method-params />
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>getCustomerAddress</method-name>
        <method-params />
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
      <method>
        <ejb-name>CustomerBean</ejb-name>
        <method-intf>Remote</method-intf>
        <method-name>setFirstName</method-name>
        <method-params>
          <method-param>java.lang.String</method-param>
        </method-params>
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
  </assembly-descriptor>
</ejb-jar>

