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.
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. |

You need to define two mandatory properties, however you can define the allowedCommand property at application level using the temn.tafj.appserver.execute.servlet.allowed.commands TAFJ property.
<env-entry> <description>Execution 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> <!-- Override main application property temn.tafj.appserver.execute.servlet.allowed.commands in case of multiple EJBs definition to refine what is allowed or not per channel --> <env-entry> <description>Regex to define what is allowed or not to be processed through trun invocation</description> <env-entry-name>allowedCommand</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> <env-entry-value>\bA.JBC.ROUTINE\b|\bANOTHER.JBC.ROUTINE\b</env-entry-value> </env-entry>

The following properties could be added to refine the configuration. See table below for detailed explanation about them.
<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>JTA timeout in seconds</description> <env-entry-name>jtaTimeout</env-entry-name> <env-entry-type>java.lang.Integer</env-entry-type> <env-entry-value>300</env-entry-value> </env-entry> <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 |
---|---|---|
allowedCommand |
Indicates the authorised programs that can be executed through tRun EJB invocation. The regular expression takes precedence over the temn.tafj.appserver.trun.allowed.commands tafj property. It is a request processing parameter. |
None |
trunTimeout |
Indicates the Temenos Transact processing timeout in seconds before throwing a session expiration. It is a request processing parameter. |
60s |
requestType |
Indicates the value to be used as a classifier in TAFJEE monitoring tool. It is a string parameter for request monitoring. |
TRUN |
jTA |
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. |
0 indictaes to use the default application server JTA timeout. |
In this topic