Her er koden for de to sessionbeans:
<?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 id="ejb-jar_ID">
<display-name>admPMPsessionEJB</display-name>
<enterprise-beans>
<session id="Opret">
<ejb-name>Opret</ejb-name>
<home>adm.pmp.cmp.OpretHome</home>
<remote>adm.pmp.cmp.Opret</remote>
<ejb-class>adm.pmp.cmp.OpretBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-local-ref id="EJBLocalRef_1078303895453">
<ejb-ref-name>ejb/Afdeling</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>adm.pmp.cmp.AfdelingLocalHome</local-home>
<local>adm.pmp.cmp.AfdelingLocal</local>
<ejb-link>admPMPEJB.jar#Afdeling</ejb-link>
</ejb-local-ref>
</session>
<session id="Stateful">
<ejb-name>Stateful</ejb-name>
<home>adm.pmp.cmp.StatefulHome</home>
<remote>adm.pmp.cmp.Stateful</remote>
<ejb-class>adm.pmp.cmp.StatefulBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
<ejb-ref id="EjbRef_1078306081265">
<ejb-ref-name>ejb/AfdelingRemote</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>adm.pmp.cmp.AfdelingHome</home>
<remote>adm.pmp.cmp.Afdeling</remote>
<ejb-link>admPMPEJB.jar#Afdeling</ejb-link>
</ejb-ref>
<ejb-local-ref id="EJBLocalRef_1078316572453">
<ejb-ref-name>ejb/Afdeling</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>adm.pmp.cmp.AfdelingLocalHome</local-home>
<local>adm.pmp.cmp.AfdelingLocal</local>
<ejb-link>admPMPEJB.jar#Afdeling</ejb-link>
</ejb-local-ref>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>Opret</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getNavn</method-name>
<method-params>
<method-param>int</method-param>
</method-params>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>