<?xml version="1.0" encoding="ISO-8859-1"?>
<!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>SFSB Integration TESTS</display-name>
   <enterprise-beans>
      <session>
         <description>A secured stateful session bean</description>
         <ejb-name>StatefulSession</ejb-name>
         <home>org.jboss.test.security.interfaces.StatefulSessionHome</home>
         <remote>org.jboss.test.security.interfaces.StatefulSession</remote>
         <ejb-class>org.jboss.test.security.ejb.SFSBTxSynchronizationBean</ejb-class>
         <session-type>Stateful</session-type>
         <transaction-type>Container</transaction-type>
         <ejb-ref>
            <ejb-ref-name>ejb/RunAsSFSB</ejb-ref-name>
            <ejb-ref-type>Session</ejb-ref-type>
            <home>org.jboss.test.security.interfaces.StatefulSessionHome</home>
            <remote>org.jboss.test.security.interfaces.StatefulSession</remote>
            <ejb-link>RunAsStatefulSession</ejb-link>
         </ejb-ref>
         <security-identity>
            <run-as>
              <role-name>InternalUser</role-name>
            </run-as>
         </security-identity>
      </session>
      <session>
         <description>A secured stateful session bean</description>
         <ejb-name>RunAsStatefulSession</ejb-name>
         <home>org.jboss.test.security.interfaces.StatefulSessionHome</home>
         <remote>org.jboss.test.security.interfaces.StatefulSession</remote>
         <ejb-class>org.jboss.test.security.ejb.StatefulSessionBean</ejb-class>
         <session-type>Stateful</session-type>
         <transaction-type>Container</transaction-type>
      </session>
   </enterprise-beans>

   <assembly-descriptor>
      <security-role>
         <description>The role required to invoke the echo method</description>
         <role-name>Echo</role-name>
      </security-role>  
     <method-permission>
        <unchecked/>
        <method>
           <ejb-name>StatefulSession</ejb-name>
           <method-name>*</method-name>
        </method>
     </method-permission>
     <method-permission>
        <role-name>InternalUser</role-name>
        <method>
           <ejb-name>RunAsStatefulSession</ejb-name>
           <method-name>*</method-name>
        </method>
     </method-permission>
      <container-transaction>
         <method>
            <ejb-name>StatefulSession</ejb-name>
            <method-name>echo</method-name>
         </method>
         <trans-attribute>Required</trans-attribute>
      </container-transaction>
   </assembly-descriptor>
</ejb-jar>
