Ejb-jar.xml

From NovaOrdis Knowledge Base
Revision as of 23:19, 23 March 2017 by Ovidiu (talk | contribs) (→‎Overview)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.