Java Enterprise Edition File
This section shows the configuration of the mandatory resources and optional properties for TAFJJEE_MDB.jar/META-INF/ejb-jar.xml.
The following code block presents the main configuration part for a given MDB called OFSTransactedMDB, which is in the <enterprise-beans> section of the ejb-jar.xml.
This code uses the mandatory resources and does not use the optional properties.
<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> <messaging-type>javax.jms.MessageListener</messaging-type> <transaction-type>Container</transaction-type> <message-destination-type>javax.jms.Queue</message-destination-type> <ejb-local-ref> <ejb-ref-name>ejb/OFSProcessingBeanLocal</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local>com.temenos.tafj.sb.OFSProcessingBeanLocal</local> <ejb-link>OFSProcessingBean</ejb-link> </ejb-local-ref> <resource-ref> <description>Used to get connections to JMS for OFS queues</description> <res-ref-name>jms/TAFJQueueConnectionFactory</res-ref-name> <res-type>javax.jms.ConnectionFactory</res-type> <res-auth>Container</res-auth> </resource-ref> <message-destination-ref> <description>OFS queue</description> <message-destination-ref-name>jms/ReplyQueue</message-destination-ref-name> <message-destination-type>javax.jms.Queue</message-destination-type> <message-destination-usage>Produces</message-destination-usage> <message-destination-link>jms/OFSReplyQueue</message-destination-link> </message-destination-ref> </message-driven>
The property values in the code block are explained in the following table. You can modify certain values in case of definition of a new channel or specific need.
Xml Path |
Example Value |
Comment |
---|---|---|
display-name |
Transacted Listener MDB for OFS |
Indicates the self-explanation about the MDB goal. You can modify this value, if required. |
ejb-name |
OFSTransactedMDB |
Indicates the application server name reference. You can modify this value, if required. |
ejb-class |
com.temenos.tafj.mdb.TransactedMDB |
Indicates the MDB class implementation. |
messaging-type |
javax.jms.MessageListener |
Indicates the JMS property. |
transaction-type |
Container |
Indicates the transaction management mode. The transaction is handled by the application server container. |
message-destination-type |
javax.jms.Queue |
Indicates the JMS property. |
EJB Reference Configuration |
||
ejb-local-ref\ejb-ref-name\ |
ejb/OFSProcessingBeanLocal |
Indicates the EJB Local interface reference. |
ejb-local-ref\ejb-ref-type |
Session |
Indicates the EJB property. |
ejb-local-ref\local |
com.temenos.tafj.sb.OFSProcessingBeanLocal |
Indicates the EJB class implementation. |
ejb-local-ref\ejb-link |
OFSProcessingBean |
Indicates if EJB is linked to process the request. This EJB name must be defined in TAFJJEE_EJB.jar/META-INF/ejb-jar.xml. You can modify this value, if required. |
Resources Reference Configuration |
||
resource-ref\ res-ref-name |
jms/TAFJQueueConnectionFactory |
Configures the JMS Connection factory for the reply queue. This value needs to be mapped in the application server configuration file. |
resource-ref\ res-type |
Javax.jms.ConnectionFactory |
Indicates the JMS property. |
resource-ref\ res-auth |
Container |
Indicates the JMS property. |
Message Destination Reference |
||
message-destination-ref\ message-destination-ref-name |
jms/ReplyQueue |
Indicates the MDB resource name for reply queue injection. This value needs to be mapped in the application server configuration file. |
message-destination-ref\message-destination-type |
Javax.jms.Queue |
Indicates the JMS property. |
message-destination-ref\message-destination-usage |
Produces |
Indicates the JMS property. |
message-destination-ref \ message-destination--link |
jms/OFSReplyQueue |
Indicates the MDB resource name for reply queue injection. This value needs to be mapped in the application server configuration file. You can modify this value, if required. This property is applicable only for Weblogic.
|
Optional properties
The following code block shows the properties which can be added in the <message-driven> section of ejb-jar to refine a specific MDB setup.
<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>
<!-- ADDITIONAL MESSAGE PARAMETERS - formatter - principal -->
<env-entry>
<env-entry-name>defaultFormatter</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>formatter class</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>defaultPrincipal</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>INPUTT/123456</env-entry-value>
</env-entry>
<!-- RESPONSE PARAMETERS -->
<env-entry>
<description>Define response delivery mode (NON_PERSISTENT = 1 PERSISTENT = 2) - default is non-persistent for performance reason</description>
<env-entry-name>responseDeliveryMode</env-entry-name>
<env-entry-type>java.lang.Integer</env-entry-type>
<env-entry-value>1</env-entry-value>
</env-entry>
<env-entry>
<description>Define whether message field JMSReplyTo should be used for response (temporary queue) - default is false</description>
<env-entry-name>sendToJmsReplyTo</env-entry-name>
<env-entry-type>java.lang.Boolean</env-entry-type>
<env-entry-value>false</env-entry-value>
</env-entry>
<env-entry>
<description>Define whether message ID should be used to fill-up response correlation id - default is false</description>
<env-entry-name>messageIdAsCorrelationID</env-entry-name>
<env-entry-type>java.lang.Boolean</env-entry-type>
<env-entry-value>false</env-entry-value>
</env-entry>
<env-entry>
<description>the response time to live in milliseconds from its dispatch time – default is zero is unlimited</description>
<env-entry-name>responseTimeToLive</env-entry-name>
<env-entry-type>java.lang.Long</env-entry-type>
<env-entry-value>0</env-entry-value>
</env-entry>
<env-entry>
<description>make use of same JMS message priority when sending response than the one defined at request level – default is false</description>
<env-entry-name>useRequestPriority</env-entry-name>
<env-entry-type>java.lang.Boolean</env-entry-type>
<env-entry-value>true</env-entry-value>
</env-entry>
<env-entry>
<description>define JMS message response priority -not considered when useRequestPriority is set to true – default is undefined which means default sender priority – priority value must be between 0 and 9</description>
<env-entry-name>responsePriority</env-entry-name>
<env-entry-type>java.lang.Integer</env-entry-type>
<env-entry-value>8</env-entry-value>
</env-entry>
<!-- ERROR HANDLING PARAMETERS -->
<env-entry>
<description>Define whether re-delivered message should be ignored - default is true a re-delivered message is not sent to Temenos Transact - when set to false re-delivered message are sent to T24</description>
<env-entry-name>ignoreRedeliveredMessage</env-entry-name>
<env-entry-type>java.lang.Boolean</env-entry-type>
<env-entry-value>false</env-entry-value>
</env-entry>
<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>1</env-entry-value>
</env-entry>
<env-entry>
<description>Define whether setRollbackOnly is called or System exception thrown in case of JMS error - default is true and current MDB is not discarded in case of JMSException</description>
<env-entry-name>recoverFromJmsFailure</env-entry-name>
<env-entry-type>java.lang.Boolean</env-entry-type>
<env-entry-value>true</env-entry-value>
</env-entry>
<env-entry>
<description>Define whether a JMS redelivered message response should be sent to reply queue in case of redelivered message ignored and not processed- default is true</description>
<env-entry-name>sendRedeliveredMessageResponse</env-entry-name>
<env-entry-type>java.lang.Boolean</env-entry-type>
<env-entry-value>true</env-entry-value>
</env-entry>
<env-entry>
<description>Override the thread name with TAFJ specific format</description>
<env-entry-name>overrideThreadName</env-entry-name>
<env-entry-type>java.lang.Boolean</env-entry-type>
<env-entry-value>false</env-entry-value>
</env-entry>
The property values in the code block are explained in the following table.
Parameter |
Description |
Default value |
---|---|---|
channelName |
Indicates the prefix to override ejb-jar.xml environment entry values with external configuration. It is a configuration parameter. For more details, see . |
Set the MDB prefix to lower case. For example, ofs for OFSTransactedMDB. |
defaultFormatter |
Indicates the formatter to be applied on the message to transform it. It is a string parameter. To apply a specific formatter, you need to add the fully qualified class name of the formatter in the value field and make it available in the application server classpath. |
None
To use OFSML formatter, use: <env-entry-value>OFSML</env-entry-value>
To use specific formatter, use: <env-entry-value>com.temenenos.formatter.MyCustomFormatter</env-entry-value> |
defaultPrincipal |
Defines a default principal for the associated message channel. It indicates string parameter for message processing. |
None
To define a principal, use: <env-entry-value>INPUTT/123456</env-entry-value> |
responseDeliveryMode |
Indicates whether response message is delivered as a PERSISTENT or NON-PERSISTENT message. The values are :
It is an integer parameter for response processing. |
1 |
sendToJmsReplyTo |
Indicates whether response message is sent to the destination defined through the getJMSReplyTo message property. The values are:
It is a Boolean parameter for response processing. |
false |
messageIdAsCorrelationID |
Defines whether response message correlation ID is set with the original message ID. The values are:
It is a Boolean parameter for response processing. |
false |
responseTimeToLive |
Indicates the response life time in milliseconds from its dispatch time before being deleted from the destination queue if not consumed. It is an integer parameter for response processing. |
0 indicates unlimited life time. |
useRequestPriority |
Makes use of the same JMS message priority than the one set for the request if set to true. It is a Boolean parameter for response processing. |
false |
responsePriority |
Defines the JMS message response priority. The valid values are 0–9. The value 9 has the highest priority. It is an integer parameter for response processing. |
None indicates the default priority (4).
Not considered when useRequestPriority is true. |
ignoreRedeliveredMessage |
Avoids message re-processing in Temenos Transact in case of message redelivery if this property is set to true. MDB receives the message but not pass it to EJB. The values are:
It is a Boolean parameter for error handling. |
true |
maxJmsRedeliveryAttempt |
Ignores message and information is logged without an associated dead letter queue. In case of message redelivery, if this value is greater or equal to zero, the message property JMSXDeliveryCount is checked against this value to protect against poison message. The values are:
This feature is disabled by default as it must be already covered by the JMS provider. It is an integer parameter for error handling. |
-1 |
recoverFromJmsFailure |
Calls setRollbackOnly and throws an EJB exception to discard MDB if set to true and false, respectively for JMS exception at MDB level. It is a Boolean parameter for error handling. |
true |
sendRedeliveredMessageResponse |
Sends message redelivery response to the reply queue (JMS Message redelivered) if an incoming JMS redelivered message is ignored and not processed. The values are:
It is a Boolean parameter for error handling. |
true |
overrideThreadName |
Overrides the default thread name, which appears in application server in specific format to identify TAFJ online threads. TAFJ-%hostname%-%channelName%-thread-%thread number% |
false |
In this topic