Platform Framework
R24 AMR | Min(s) read

EJB-JAR Configuration Override

Besides configuring EJBs and MDBs properties through deployment descriptors within jar files, it is possible to override the default environment entries configuration without amending the ear file. This section shows how to override the default entires with example.

This override applies only to environment entries defined within <env-entry> sections in ejb-jar.xml deployment descriptors.
<env-entry>
       <description>Define the number of re-delivery attempt in case of failure - -1 means disabled by default the JMS provider handles the maximum number of JMS delivery attempt - 0 means no re-delivery attempt</description>
       <env-entry-name>maxJmsRedeliveryAttempt</env-entry-name>
       <env-entry-type>java.lang.Integer</env-entry-type>
       <env-entry-value>0</env-entry-value>
</env-entry>

To get a fully open configuration capability, it is recommended to use TAFJJEE Micro, if possible.

The configuration override can be done through any TAFJ configuration property source—system property, environment variable or tafj property. To inject the environment entry within the appropriate EJB or MDB a service classifier is used. Except for online processing where the classifier is defined at ejb-jar level through property “channelName”, all other classifier are fixed and are presented below.

Service type

EJB

Service name

Online processing

OFSProcessingBean / CallAtProcessingBean

channelName=ejb prefix to lowercase

Phantom processing

PhantomListener

phantom

tRun processing

TRunProcessingBean

trun

Management activities

TAFJManagementBean

management

For example, the following code is to set the property ofsSource to the EJB OFSProcessingBean and the ignoreRedeliveredMessage to the MDB OFSTransactedMDB with the channelName property defined for MDB and EJB.

<message-driven>
        <display-name>Transacted Listener MDB for OFS</display-name>
        <ejb-name>OFSTransactedMDB</ejb-name>
        <ejb-class>com.temenos.tafj.mdb.TransactedMDB</ejb-class>
        ..	
        <env-entry>
                <description>service name for property injection set by default to EJB prefix to lower case</description>
                <env-entry-name>channelName</env-entry-name>
                <env-entry-type>java.lang.String</env-entry-type>
                <env-entry-value>ofs</env-entry-value>
        </env-entry>

<enterprise-beans>
        <!-- T24 Processing EJBs -->
        <session>
        <!-- Bean for OFS request processing used by TransactedBean -->
        <description>TAFJ OFS Bean</description>
        <display-name>TAFJ OFS Bean</display-name>
        <ejb-name>OFSProcessingBean</ejb-name>
…
        <env-entry>
                <description>service name for property injection set by default to EJB prefix to lower case</description>
                <env-entry-name>channelName</env-entry-name>
                <env-entry-type>java.lang.String</env-entry-type>
                <env-entry-value>ofs</env-entry-value>
        </env-entry>

You can override the ejb-jar.xml OFSProcessingBean and OFSTransactedMDB configuration by configuring the following:

  • ofs.ofsSource=GCS.OVERRIDE
  • ofs.ignoreRedeliveredMessage=false

For bean level configuration, you need to do the following.

EJB

Property

PhantomListenerMDB

phantom.jtaTimeout=3600

TafjManagementBean

management.serverRegistration=true

TrunProcessingBean

trun.isJTA=true

Copyright © 2020- Temenos Headquarters SA

Published on :
Monday, May 27, 2024 5:10:14 PM IST