Professional Documents
Culture Documents
TAFJ-AS Online Transaction
TAFJ-AS Online Transaction
T r a n s a c ti o n
R20
TAFJ-AS-o nli n e-t r a n s a c ti o n-s e t u p
Amendment History:
Revisio
Date Amended Name Description
n
Basheer
6 26th March 2020 R20 AMR review
Ahamed
Page 2
TAFJ-AS-o nli n e-t r a n s a c ti o n-s e t u p
Copyri g h t
Copyright © Temenos Headquarters SA 2009-2020. All rights reserved.
This document contains proprietary information that is protected by copyright. No part of this document may
be reproduced, transmitted, or made available directly or indirectly to a third party without the express
written agreement of TEMENOS UK Limited. Receipt of this material directly TEMENOS UK Limited
constitutes its express permission to copy. Permission to use or copy this document expressly excludes
modifying it for any purpose, or using it to create a derivative therefrom.
Temenos Headquarters SA
2 Rue de l’Ecole-de-Chimie,
CH - 1205 Geneva,
Switzerland
Please include your name, company, address, and telephone and fax numbers, and email
address if applicable. TAFJdev@temenos.com
Page 3
TAFJ-AS-o nli n e-t r a n s a c ti o n-s e t u p
Table of Contents
Copyright................................................................................................................................................ 3
Errata and Comments............................................................................................................................ 3
Overview................................................................................................................................................ 5
Prerequisite............................................................................................................................................ 6
Association between MDB and EJB...................................................................................... 6
Current configuration overview.............................................................................................. 6
Transaction models................................................................................................................................ 8
EJB Bean managed transaction............................................................................................ 9
Presentation....................................................................................................................... 9
Pros. and cons................................................................................................................... 9
Configuration................................................................................................................... 10
End to end container managed transaction........................................................................ 11
Presentation..................................................................................................................... 11
Pros. and cons................................................................................................................. 11
Configuration................................................................................................................... 12
Container managed requires new....................................................................................... 13
Presentation..................................................................................................................... 13
Pros. and cons................................................................................................................. 13
Configuration................................................................................................................... 14
EJB Bean managed with JTA enabled................................................................................ 15
Presentation..................................................................................................................... 15
Pros. and cons................................................................................................................. 15
Configuration................................................................................................................... 16
Page 4
TAFJ-AS-o nli n e-t r a n s a c ti o n-s e t u p
Overvi e w
TAFJ EE application is used to process online transaction in an application server context.
MDBs and EJBs are configured by default through deployment descriptor packaged in above
mentioned jar files.
http://docs.oracle.com/javaee/6/tutorial/doc/bncih.html
TAFJJEE_EAR file is shipped with a default configuration and could be changed easily
depending on specific need.
Each T24 online channel could have its own configuration. There is no better configuration
from another, the use case determines what should or should not be used.
The purpose of this document is to present the different transaction models, their pros. and
cons., and how they can be configured.
Page 5
TAFJ-AS-o nli n e-t r a n s a c ti o n-s e t u p
Prer e q u i s i t e
Please refer to TAFJ-AS TAFJ documentation for detailed explanation about application
server deployment and TAFJEE application architecture.
An understanding on how MDBs and EJBs are defined, configured and linked together is
required.
</message-driven>
</session>
http://localhost:8080/TAFJEE/sanitycheck/dashboard.xhtml
Page 6
TAFJ-AS-o nli n e-t r a n s a c ti o n-s e t u p
i.e.
tafjHome\bin>EarFileParser -log
C:\development\demo\mavenDemo\target\demo\tafjHome\appserver\jboss\jboss6eap\TAFJJ
EE_EAR.ear
TAFJ_HOME/log/
Page 7
TAFJ-AS-o nli n e-t r a n s a c ti o n-s e t u p
Tran s a c t i o n mo d e l s
Online transactions are performed through JMS invocation.
MDBs are responsible to handle incoming messages and to do EJBs invocations. EJBs are
responsible to process T24 requests by invoking OFS.BULK.MANAGER.
On EJBs invocation return, T24 responses are sent to reply queues by MDBs. There is a one
to one relationship between MDB and EJB, this is what we call a T24 channel.
Each channel could have its own parameters: OFS source, formatter, time out and
transaction model.
For online processing MDBs are always using container managed transaction, this is at EJBs
level that configuration could be changed to fit a specific use case. However depending on
EJBs setup, MDBs configuration could also be tuned to avoid message re-processing.
Page 8
TAFJ-AS-o nli n e-t r a n s a c ti o n-s e t u p
EJB Be a n ma n a g e d tran s a c t i o n
Pre s e n t a t i o n
There is a demarcation between JMS message and EJB processing.
T24 could manage multiple transactions within a single message based on jBC statements
TRANSTART / TRANSEND / TRANSABORT.
Although this is possible, there shouldn’t be multiple transactions as these statements should
be only used within a single EB.TRANS invocation.
JMS message(s) sent through CALLJEE statements are also part of their own transaction.
When a WRITE is performed outside a transaction (no TRANSTART being called), it will be
committed and a trace in the logs will report it (write outside of a transaction).
Re-delivered message have to be considered and ignored at MDB level to avoid a re-
processing of a request.
Pros . and co n s .
Pros. Cons.
CALLJEE SYNC mode could be used. Need to protect against redelivered JMS
message as there is separation between
JMS message processing and request
processing.
Page 9
TAFJ-AS-o nli n e-t r a n s a c ti o n-s e t u p
Confi g u r a t i o n
The EJB transaction type must be set to Bean.
<ejb-name>OFSProcessingBean</ejb-name>
<ejb-class>com.temenos.tafj.sb.OFSProcessingBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
Page 10
TAFJ-AS-o nli n e-t r a n s a c ti o n-s e t u p
Pre s e n t a t i o n
There is one unique global transaction from incoming message to response sending:
database updates, CALLJEE messages are part of same transaction.
This mode cannot be used for T24 validation requests, as validation process requires
database rollback and send a success status to the caller without triggering a message re-
delivery.
Pros . and co n s .
Pros. Cons.
Container manages the transaction Doesn’t fit T24 validation process, where T24
everything is under same scope. needs to rollback database transaction only
and message must not be re-delivered.
Messages could be safely re-delivered and CALLJEE SYNC mode cannot be used and
sent for re-processing in case of error. will block.
Page 11
TAFJ-AS-o nli n e-t r a n s a c ti o n-s e t u p
Confi g u r a t i o n
The EJB transaction type must be set to Container.
<ejb-name>OFSProcessingBean</ejb-name>
<ejb-class>com.temenos.tafj.sb.OFSProcessingBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<message-driven>
<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>
…
<env-entry>
<env-entry-name>com.temenos.tafj.mdb.TransactedMDB/ignoreRedeliveredMessage</env-en-
try-name>
<env-entry-type>java.lang.Boolean</env-entry-type>
<env-entry-value>false</env-entry-value>
</env-entry>
</message-driven>
Page 12
TAFJ-AS-o nli n e-t r a n s a c ti o n-s e t u p
Cont a i n e r ma n a g e d req u i r e s ne w
Pre s e n t a t i o n
There is one unique global transaction per container, a demarcation is introduced between
MDB and EJB container.
Database updates, CALLJEE messages are part of same transaction but a rollback order at
EJB level will not trigger a message re-delivery.
Pros . and co n s .
Pros. Cons.
EJB container manages the transaction: Need to protect against redelivered JMS
databases updates and CALLJEE are under message as there is separation between
same scope. JMS message processing and request
processing.
Fit T24 validation process by just doing CALLJEE SYNC mode cannot be used and
database rollback. (CALLJEE is rollback as will block.
well)
Page 13
TAFJ-AS-o nli n e-t r a n s a c ti o n-s e t u p
caller.
Confi g u r a t i o n
The EJB transaction type must be set to Container.
A container transaction section for related EJB must be added at the end of the deployment
descriptor. It specifies that a new transaction is required when entering processMessage()
method.
…
</session>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>OFSProcessingBean</ejb-name>
<method-name>processMessage</method-name>
</method>
<trans-attribute>RequiresNew</trans-attribute>
</container-transaction>
</assembly-descriptor>
Page 14
TAFJ-AS-o nli n e-t r a n s a c ti o n-s e t u p
Pre s e n t a t i o n
Almost same configuration than EJB Container managed require new, except this is the EJB
which manages the transaction. When switching the EJB option JTA mode to true there will
be a global transaction at EJB level.
Database updates, CALLJEE messages are part of same transaction, a rollback order at
EJB level will not trigger a message re-delivery.
Pros . and co n s .
Pros. Cons.
EJB manages the transaction everything is Need to protect against redelivered JMS
under same scope. message as there is separation between
JMS message processing and request
processing.
Fit T24 validation process by just doing CALLJEE SYNC mode cannot be used and
database rollback. (CALLJEE is rollback as will block.
well)
Page 15
TAFJ-AS-o nli n e-t r a n s a c ti o n-s e t u p
Confi g u r a t i o n
The EJB transaction type must be set to Bean.
To enable JTA mode and make use of user transaction the above env-entry section must be
added to same EJB.
<ejb-name>OFSProcessingBean</ejb-name>
<ejb-class>com.temenos.tafj.sb.OFSProcessingBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
<env-entry>
<description>OFS OFS Source</description>
<env-entry-name>com.temenos.tafj.sb.OFSProcessingBean/ofsSource</env-entry-
name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>GCS</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>com.temenos.tafj.sb.OFSProcessingBean/ofsTimeout</env-entry-
name>
<env-entry-type>java.lang.Integer</env-entry-type>
<env-entry-value>60</env-entry-value>
</env-entry>
<env-entry>
<description>jTA</description>
<env-entry-name>com.temenos.tafj.sb.OFSProcessingBean/jTA</env-entry-name>
<env-entry-type>java.lang.Boolean</env-entry-type>
<env-entry-value>true</env-entry-value>
</env-entry>
</session>
Page 16