Ejb-jar.xml: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
Line 6: Line 6:


Goes into the META-INF directory of the deployment artifact.
Goes into the META-INF directory of the deployment artifact.
<pre>
<?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>com.squaretrade.core.transaction.TxSynchronizationInterceptor</interceptor-class>
    </interceptor>
  </interceptors>
  <assembly-descriptor>
    <!-- Applies to all beans in the deployment -->
    <interceptor-binding>
      <ejb-name>*</ejb-name>
      <interceptor-class>com.squaretrade.core.transaction.TxSynchronizationInterceptor</interceptor-class>
    </interceptor-binding>
  </assembly-descriptor>
</ejb-jar>
</pre>
=Elements=
==<module-name>==
The name of the EJB module. The value specified here overrides the default ''[[EJB_Concepts#module-name|module-name]]'' component of the JNDI names for EJBs deployed as part of this application.

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>com.squaretrade.core.transaction.TxSynchronizationInterceptor</interceptor-class>
    </interceptor>
  </interceptors>

  <assembly-descriptor>
    <!-- Applies to all beans in the deployment -->
    <interceptor-binding>
      <ejb-name>*</ejb-name>
      <interceptor-class>com.squaretrade.core.transaction.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.