Platform Framework
R24 AMR | Min(s) read

tRun Channel

The tRun channel is similar to the Phantom channel as it allows executing authorised Temenos Transact programs in background mode through an EJB invocation. This section provides details on the channel architecture, authorised programs used in this channel, user input data and execution failure. It also provides the properties (both mandatory and optional) of TRunProcessingBean.

Architecture

This EJB invocation can be triggered by any of the following:

  • Web interface tRun Execution servlet packaged within TAFJEE.war. Refer to tRunServlet section.
  • JAXRS webservice based and packaged within TAFJRestServices.war. Refer to Webservice Component section.
  • TAFJJEE EJB customer available in TAFJClient.jar. Refer to TAFJEE Entry Points section.

When using the Phantom channel, you need to define a set of authorised programs. It is a synchronous invocation and returns the execution status (success or failure). The user input data can be provided as execution parameters. The program output can be captured and returned. A default timeout is defined and can be refined on a per request basis.

The component involved for processing is the TRunProcessingBean bean managed EJB, packaged with regular OFS EJBs in TAFJJEE_EJB.jar component. Same transaction rules other than the one defined for the PhantomListener apply where Temenos Transact manages a JTA transaction through EB.TRANS invocation to commit or rollback database operations.

Authorised programs

The programs need to be authorised with a regular expression defined by any of the following ways before execution.

  • EJB env-entry allowedCommand
  • Tafj property temn.tafj.appserver.trun.allowed.commands

The EJB env-entry takes precedence over the tafj property. The following table lists the commands to execute routines.

Routine

Command

Execute A.JBC.ROUTINE or OTHER.JBC.ROUTINE only.

temn.tafj.appserver.trun.allowed.commands=\bA.JBC.ROUTINE \b|\bOTHER.JBC.ROUTINE\b

Execute all routines except A.JBC.ROUTINE or OTHER.JBC.ROUTINE.

temn.tafj.appserver.trun.allowed.commands=((?!\A.JBC.ROUTINE\b)(?!\OTHER.JBC.ROUTINE\b).)*

The ejb-jar setting takes precedence over the tafj property.

User Input Data and Execution Failure

Since certain programs make use of the user input data when running in interactive mode, this functionality is also available in the background mode with the expected data pre-filled as program arguments.

In case of missing user input data, the program execution will be aborted with execution status as FAILURE (service response is set to 1) and the following message is reported in the program output.

“Missing INPUT DATA. When executing trun in background mode all program input datas have to be provided by caller. Execution aborted »

The details of the failure reason can be found within TAFJ logs (ejb, runtime, database). In case of session expiration error, the tRun default timeout set at EJB level can be overridden on a per request basis. Refer to the appropriate tRun client section to setup this parameter.

TRunProcessingBean Component Configuration

The TRunProcessingBean EJB is configured in TAFJJEE_EAR.ear\TAFJJEE_EJB.jar META-INF\ejb-jar.xml within the <enterprise-beans> section.

<session>
        <!-- Bean for tRun request processing -->
        <description>TAFJ trun EJB</description>
        <display-name>TAFJ trun EJB</display-name>
        <ejb-name>TRunProcessingBean</ejb-name>
        <business-local>com.temenos.tafj.sb.TRunProcessingBeanLocal</business-local>
        <business-remote>com.temenos.tafj.sb.TRunProcessingBeanRemote</business-remote>
        <ejb-class>com.temenos.tafj.sb.TRunProcessingBean</ejb-class>
        <session-type>Stateless</session-type>
        <transaction-type>Bean</transaction-type>
        <env-entry>
                <description>Request type for monitoring</description>
                <env-entry-name>requestType</env-entry-name>
                <env-entry-type>java.lang.String</env-entry-type>
                <env-entry-value>TRUN</env-entry-value>
        </env-entry>
        <env-entry>
                <description>Processing timeout in seconds</description>
                <env-entry-name>trunTimeout</env-entry-name>
                <env-entry-type>java.lang.Integer</env-entry-type>
                <env-entry-value>60</env-entry-value>
        </env-entry>
        <!-- for T24 purpose -->
        <resource-ref>
                <description>Used to get connections from T24 jdbc pool</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 from locking jdbc pool</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 from T24 jdbc RO pool</description>
                <res-ref-name>jdbc/t24RODataSource</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>Container</res-auth>
        </resource-ref>
</session>

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

ejb-name

TRunProcessingBean

Indicates the EJB name.

ejb-class

com.temenos.tafj.sb.TRunProcessingBean

Indicates the TAFJ implementation class.

business-local

com.temenos.tafj.sb.TRunProcessingBeanLocal

Indicates the EJB TAFJ Local interface.

business-remote

com.temenos.tafj.sb.TRunProcessingBeanRemote

Indicates the EJB TAFJ Remote interface.

session-type

Stateless

Indicates the EJB property.

transaction-type

Bean

Indicates the transaction management mode. The bean handles the transaction.

Property Configuration

env-entry\env-entry-name

trunTimeout

Indicates the property name, which is used to configure the property timeout in seconds.

env-entry\env-entry-value

60

Indicates the tRun timeout value in seconds. You can modify this value, if required.

env-entry\env-entry-name

allowedCommand

Indicates the property name, which is used to configure the set of authorised programs.

env-entry\env-entry-type

\bA.JBC.ROUTINE\b|\bANOTHER.JBC.ROUTINE\b

Indicates the regular expression defining the allowed commands. You can modify this value, if required.

Resources Reference Configuration

resource-ref\ res-ref-name

jdbc/t24DataSource

Configures the application server JDBC resource for Temenos Transact database. This property 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 property 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 database. This property needs to be mapped in the application server configuration file.

Copyright © 2020- Temenos Headquarters SA

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