Ejb-jar.xml: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
Line 20: Line 20:
   <interceptors>
   <interceptors>
     <interceptor>
     <interceptor>
       <interceptor-class>com.squaretrade.core.transaction.TxSynchronizationInterceptor</interceptor-class>
       <interceptor-class>io.novaordis.example.TxSynchronizationInterceptor</interceptor-class>
     </interceptor>
     </interceptor>
   </interceptors>
   </interceptors>
Line 28: Line 28:
     <interceptor-binding>
     <interceptor-binding>
       <ejb-name>*</ejb-name>
       <ejb-name>*</ejb-name>
       <interceptor-class>com.squaretrade.core.transaction.TxSynchronizationInterceptor</interceptor-class>
       <interceptor-class>io.novaordis.example.TxSynchronizationInterceptor</interceptor-class>
     </interceptor-binding>
     </interceptor-binding>
   </assembly-descriptor>
   </assembly-descriptor>

Latest revision as of 23:19, 23 March 2017

Internal

Overview

Goes into the META-INF directory of the deployment artifact.

<?xml version="1.0" encoding="UTF-8"?>
<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_1.xsd"
        version="3.1">

  <module-name>blue-services</module-name>

  <interceptors>
    <interceptor>
      <interceptor-class>io.novaordis.example.TxSynchronizationInterceptor</interceptor-class>
    </interceptor>
  </interceptors>

  <assembly-descriptor>
    <!-- Applies to all beans in the deployment -->
    <interceptor-binding>
      <ejb-name>*</ejb-name>
      <interceptor-class>io.novaordis.example.TxSynchronizationInterceptor</interceptor-class>
    </interceptor-binding>
  </assembly-descriptor>
</ejb-jar>

Elements

<module-name>

The name of the EJB module. The value specified here overrides the default module-name component of the JNDI names for EJBs deployed as part of this application.