<ejb-jar
        xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                            http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
        version="3.0">
	<interceptors>
      <interceptor>
         <interceptor-class>org.jboss.tutorial.interceptor.bean.AccountsCancelInterceptor</interceptor-class>
         <around-invoke>
            <method-name>sendCancelMessage</method-name>
         </around-invoke>
         <resource-ref>
         	<res-ref-name>jms/ConnFactory</res-ref-name>
            <res-type>javax.jms.QueueConnectionFactory</res-type>
            <res-auth>Container</res-auth>
            <mapped-name>java:/ConnectionFactory</mapped-name>
            <injection-target>
               <injection-target-class>org.jboss.tutorial.interceptor.bean.AccountsCancelInterceptor</injection-target-class>
               <injection-target-name>cf</injection-target-name>
            </injection-target>
         </resource-ref>
         <resource-env-ref>
         	<resource-env-ref-name>accountsQueue</resource-env-ref-name>
            <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
            <mapped-name>queue/tutorial/accounts</mapped-name>
            <injection-target>
               <injection-target-class>org.jboss.tutorial.interceptor.bean.AccountsCancelInterceptor</injection-target-class>
               <injection-target-name>queue</injection-target-name>
            </injection-target>
         </resource-env-ref>
      </interceptor>   
	</interceptors>
	<assembly-descriptor>
	   <!-- Default interceptor that will apply to all methods for all beans in deployment -->
	   <interceptor-binding>
         <ejb-name>*</ejb-name>
         <interceptor-class>org.jboss.tutorial.interceptor.bean.DefaultInterceptor</interceptor-class>
      </interceptor-binding>
	  <!-- Class interceptor that will apply to all methods for EmailSystemBean -->
	   <interceptor-binding>
         <ejb-name>org.jboss.tutorial.interceptor.bean.EmailSystemBean</ejb-name>
         <interceptor-class>org.jboss.tutorial.interceptor.bean.OtherInterceptor</interceptor-class>
      </interceptor-binding>
	   <!-- Method interceptor will apply to sendBookingCancellationMessage for EmailSystemBean -->
	   <interceptor-binding>
         <ejb-name>org.jboss.tutorial.interceptor.bean.EmailSystemBean</ejb-name>
         <interceptor-class>org.jboss.tutorial.interceptor.bean.AccountsCancelInterceptor</interceptor-class>
         <method>
           <method-name>sendBookingCancellationMessage</method-name>
         </method>
      </interceptor-binding>
	   <interceptor-binding>
         <ejb-name>org.jboss.tutorial.interceptor.bean.EmailSystemBean</ejb-name>
         <exclude-default-interceptors>true</exclude-default-interceptors>
         <exclude-class-interceptors>true</exclude-class-interceptors>
         <method>
           <method-name>noop2</method-name>
         </method>
      </interceptor-binding>
      <interceptor-binding>
         <ejb-name>org.jboss.tutorial.interceptor.bean.EmailSystemBean</ejb-name>
         <interceptor-order>
            <interceptor-class>org.jboss.tutorial.interceptor.bean.AccountsCancelInterceptor</interceptor-class>
            <interceptor-class>org.jboss.tutorial.interceptor.bean.DefaultInterceptor</interceptor-class>
            <interceptor-class>org.jboss.tutorial.interceptor.bean.OtherInterceptor</interceptor-class>
            <interceptor-class>org.jboss.tutorial.interceptor.bean.TracingInterceptor</interceptor-class>
         </interceptor-order>
         <method>
           <method-name>sendBookingCancellationMessage</method-name>
         </method>
      </interceptor-binding>
	</assembly-descriptor>
</ejb-jar>