Phantom MDB EJB JAR Component Configuration
This section provides the configuration of the MDB and EJB components for the Phantom channel, optional properties and briefs on the shared phantom queue.
The Phantom MDB is configured in TAFJJEE_EAR.ear\TAFJJEE_MDB.jar META-INF\ejb-jar.xml within the <enterprise-beans> section.
<message-driven> <display-name>Phantom Executor MDB</display-name> <ejb-name>TAFJPhantomListenerMDB</ejb-name> <mapped-name>jms/t24EXECQueue</mapped-name> <ejb-class>com.temenos.tafj.mdb.PhantomListener</ejb-class> <messaging-type>javax.jms.MessageListener</messaging-type> <transaction-type>Bean</transaction-type> <message-destination-type>javax.jms.Queue</message-destination-type> <activation-config> <activation-config-property> <activation-config-property-name>acknowledgeMode</activation-config-property-name> <activation-config-property-value>Auto-acknowledge</activation-config-property-value> </activation-config-property> <!-- JBoss uncomment this section and configure maxSession value more than 15 consumers are needed --> <activation-config-property> <activation-config-property-name>maxSession</activation-config-property-name> <activation-config-property-value>50</activation-config-property-value> </activation-config-property> </activation-config> <!-- EB.TRANS - JTA timeout in seconds - 0 means use the default application server JTA timeout --> <env-entry> <env-entry-name>jtaTimeout</env-entry-name> <env-entry-type>java.lang.Integer</env-entry-type> <env-entry-value>3600</env-entry-value> </env-entry> <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> <resource-ref> <description>EXEC queue</description> <res-ref-name>jms/t24EXECQueue</res-ref-name> <res-type>javax.jms.Queue</res-type> <res-auth>Container</res-auth> </resource-ref> <resource-ref> <description>Used to get connections JDBC T24 data source</description> <res-ref-name>jdbc/t24DataSource</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> <resource-ref> <description>Used to get connections JDBC locking data source</description> <res-ref-name>jdbc/t24LockingDataSource</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> <resource-ref> <description>Used to get connections JDBC RO data source</description> <res-ref-name>jdbc/t24RODataSource</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> <resource-ref> <description>Used to get connections to JMS for TEC</description> <res-ref-name>jms/TopicConnectionFactory</res-ref-name> <res-type>javax.jms.ConnectionFactory</res-type> <res-auth>Container</res-auth> </resource-ref> <resource-ref> <description>TEC topic</description> <res-ref-name>jms/tecEventsTopic</res-ref-name> <res-type>javax.jms.Topic</res-type> <res-auth>Container</res-auth> </resource-ref> </message-driven>
The property values in the code block are explained in the following table. You can modify certain values, if required.
Xml Path |
Example Value |
Comment |
---|---|---|
ejb-name |
TAFJPhantomListenerMDB |
Indicates the MDB name. |
ejb-class |
com.temenos.tafj.mdb.PhantomListener |
Indicates the TAFJ implementation class. |
transaction-type |
Bean |
Indicates the transaction management type. You cannot modify this value. |
mapped-name |
jms/t24EXECQueue |
Defines the physical queue of MDB. This property is applicable only for WebLogic. |
messaging-type |
javax.jms.MessageListener |
Indicates the JMS property. |
message-destination-type |
javax.jms.Queue |
Indicates the JMS property. |
activation-config-property-name |
acknowledgeMode |
Indicates the JMS property. |
activation-config-property-name |
Auto-acknowledge |
Indicates the JMS property. |
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-ref-name |
jdbc/t24DataSource |
Configures the application server JDBC resource for Temenos Transact database. This value needs to be mapped in the application server configuration file. |
resource-ref\ res-ref-name |
jdbc/t24LockingDataSource |
Configures the application server JDBC resource for Temenos Transact locking in database. This value needs to be mapped in the application server configuration file. |
resource-ref\ res-ref-name |
jdbc/t24RODataSource |
Configures the application server JDBC resource for Temenos Transact read-only sdatabase. This value needs to be mapped in the application server configuration file. |
resource-ref\ res-ref-name |
jms/TopicConnectionFactory |
Configures the JMS TOPIC factory for TEC events publishing. This value needs to be mapped in the application server configuration file. |
resource-ref\ res-ref-name |
jms/tecEventsTopic |
Configures the JMS TOPIC for TEC events publishing. This value needs to be mapped in the application server configuration file. |
resource-ref\ res-ref-name |
jms/t24EXECQueue |
Configures the JMS EXEC Queue to send new command. This value needs to be mapped in the application server configuration file. |
Optional Properties
The following code block shows the properties which can be added in the <message-driven> section of ejb-jar to refine the PhantomListener MDB setup.
<!-- ERROR HANDLING PARAMETERS --> <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> <!-- Flag to enable / disable EB.TRANS part of JTA – default is true --> <env-entry> <env-entry-name>isJTA</env-entry-name> <env-entry-type>java.lang.Boolean</env-entry-type> <env-entry-value>true</env-entry-value> </env-entry>
The property values in the code block are explained in the following table.
Parameter |
Description |
Default value |
---|---|---|
isJTA |
Indicates if EB.TRANS is part of a JTA transaction or not. The values are:
This parameter must be set to true only to make DB and CALLJEE part of same unit of work. It is a processing parameter. |
true |
jtaTimeout |
Indicates the EB.TRANS transaction timeout in seconds. It is a processing parameter. |
The default values are:
|
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 |
The PhantomListener MDB uses the same Temenos Transact data sources and TEC events topic and connection factory as of OFS EJB.
For more details about EJB configuration for jboss, websphere and WebLogic for application server, see EJB Components Configuration.
Shared Phantom Queue
You can use a shared phantom queue across all server instances by defining a JMS message selector in environments supporting dynamic activation-config-property replacement (for example JBoss or Wildfly).
You need to define a unique ID per server and set to system property phantomSelector. This property is used in the message selector definition within the activation configuration property. The message selector confirms if a message is consumed by the appropriate server by checking phantomSelector, the JMS message property.
The following code block shows the activation configuration parameter to add to the PhantomListener MDB.
<!-- to apply messageSelector and use common ExecQueue to all servers --> <activation-config-property> <activation-config-property-name>messageSelector</activation-config-property-name> <activation-config-property-value>PhantomSelector='${phantomSelector}' OR PhantomSelector IS NULL</activation-config-property-value> </activation-config-property>
In case of messages without phantomSelector, any of the registered PhantomListener consumes the message. When the environment defines a phantomSelector property, the TAFJ services targeting the Exec queue will set it as a JMS message property to ensure processing on the same server instance.
In this topic