Sie sind auf Seite 1von 35

How to create a lead company in T24 within 10 minutes?

September 25, 2013, 06:30:08 PM by beta

Purpose:
This blog is to demonstrate on how to create a new lead company in minutes.
(Usually created by those technical consultants who are in a hurry to catch a flight
) Please keep in mind that creating a new company in T24 requires good
amount of requirement gathering and whole lot of analysis in financial terms. This
blog should not be taken as a reference by those, you intend to create companies
in production environment. Well, yes you can take a gist of it though.

Prerequisites:
1. T24 administration
2. T24 COB
3. Knowledge on the concept of company setup in T24

Pre-setup:
1. Ensure no one is logged into T24 except you.
2. Decide on the company ID
The company ID is of the format
<COUNTRYCODE><COMPANY.GROUP.ID><GEOGRAPHICAL.CODE>. For our example,
we will use , BE0010001
3. Decide on the company mnemonic which is a three letter word. Here, BE1
4. Decide sub division code. This value should be unique for records in COMPANY table. Fire
the below query in the back end.

Code: [Select]
LIST F.COMPANY SUB.DIVISION.CODE ONLY

@ID........ SUB.DIVISION.CODE

GB0010003 0005

SG0010001 0003
EU0010001 0002

GB0010001 0001

GB0010002 0004

GB0010004 0006

From the above output, we can take the sub division code as 007 which makes sense.(And
cool too!)

5. Choose an already existing company whose values can be used to default values to the
new company. Here, we take EU0010001 as the company from which we can default most of
the values to our new company.

Setup:

1. Check if BATCH.NEW.COMPANY has records, IBLC.TODAY and


SYSTEM.END.OF.DAY4. In case these records are present, reverse them as these are
obsolete now.
2. Using COMPANY.CREATE, input the new company record using ID BE0010001 as shown
below and verify it.

Code: [Select]
Model Bank create new company INPUT

COMPANY........... BE0010001
------------------------------------------------------------------------

------

1. 1 GB COMPANY.NAME Belgium
2. 1 NAME.ADDRESS... City of Brussels
3 MNEMONIC.......... BE1
4 FINANCIAL.COM..... BE-001-0001

5 FINANCIAL.MNE.....
6 SUB.DIVISION.CODE. 7

7 CREATION.DATE.....
8 DEFAULT.COMPANY... EU-001-0001

9 RESERVED.8........
10 RESERVED.7........

11 RESERVED.6........

12 RESERVED.5........

13 RESERVED.4........

14 RESERVED.3........

15 RESERVED.2........

16 RESERVED.1........

------------------------------------------------------------------------

------

Field FINANCIAL.COM is important as the value to this field decides whether the company is a
lead company or a book. If the value in this field is the same as the ID of the record, then it is a
lead company. If it refers to ID of some other company, this new company will be the book for
the company referred to.

COMPANY.CREATE is a W type file which will trigger COMPANY application once verified.

Code: [Select]
Model Bank create new company INPUT

COMPANY.CODE...... BE-001-0001

---------------------------------------------------------

1. 1 GB COMPANY.NAME Belgium

2. 1 NAME.ADDRESS... City of Brussels


3 MNEMONIC.......... BE1

4 LANGUAGE.CODE..... 1

5 STAT.REP.AREA.....

6 STAT.REP.NAME.....

7 STAT.REP.DELIV....

8 MGMT.REP.AREA.....

9 MGMT.REP.NAME.....

10 MGMT.REP.DELIV....
11 CONSOLIDATION.MARK N
12 DEFAULT.NO.OF.AUTH 1
13. 1 PGM.AUTOM.ID... ACCOUNT
13. 2 PGM.AUTOM.ID... DX.CO.EXT.XFER.MANUAL
13. 3 PGM.AUTOM.ID... DX.CO.XFER.MANUAL
13. 4 PGM.AUTOM.ID... ST.GROUP.FIX
---------------------------------------------------------

3. Commit this record and you will find the below files being generated for the new company.

[ 417 ] File ../bnk.data/FBE1.AA.A037 created , type = XMLORACLE


[ 417 ] File ../bnk.data/FBE1.AA.A038 created , type = XMLORACLE
[ 417 ] File ../bnk.data/FBE1.AA.A039 created , type = XMLORACLE
[ 417 ] File ../bnk.data/FBE1.AA.A040 created , type = XMLORACLE
[ 417 ] File ../bnk.data/FBE1.AA.A041 created , type = XMLORACLE
[ 417 ] File ../bnk.data/FBE1.AA.A042 created , type = XMLORACLE
[ 417 ] File ../bnk.data/FBE1.AA.A043 created , type = XMLORACLE
[ 417 ] File ../bnk.data/FBE1.AA.A044 created , type = XMLORACLE
[ 417 ] File ../bnk.data/FBE1.AA.A045 created , type = XMLORACLE
[ 417 ] File ../bnk.data/FBE1.AA.A046 created , type = XMLORACLE

.
.
[ 417 ] File ../bnk.data/FBE1.AA.A133 created , type = XMLORACLE
[ 417 ] File ../bnk.data/FBE1.AA.A134 created , type = XMLORACLE
[ 417 ] File ../bnk.data/FBE1.AA.A135 created , type = XMLORACLE
[ 417 ] File ../bnk.data/FBE1.AA.A136 created , type = XMLORACLE
[ 417 ] File ../bnk.data/FBE1.AA.A137 created , type = XMLORACLE
[ 417 ] File ../bnk.data/FBE1.AA.A138 created , type = XMLORACLE
[ 417 ] File ../bnk.data/FBE1.AA.A139 created , type = XMLORACLE

This goes on for several minutes and you will be redirected to main screen once done.

4. At this level, the new company has already been created and ready for use to login to and
roam around. But alas! Who has access to the new company?
5. Amend any user profile such that the new company code is reflected in COMPANY.CODE.

Eg.
Code: [Select]
5. 1 COMPANY.CODE... GB0010001

5. 2 COMPANY.CODE... EU0010001

5. 3 COMPANY.CODE... SG0010001

5. 4 COMPANY.CODE... BE0010001

5. 5 COMPANY.CODE... GB0010002
6. Once this is done, you will have to use PASSWORD application to login to this new
5. 6 COMPANY.CODE... GB0010003
company.
7.
5. Type PASSWORD in theGB0010004
7 COMPANY.CODE... main screen and choose option 2 to change company

Code: [Select]
----------------------------

SELECT ACTIVATION

1 = CHANGE PASSWORD

2 = CHANGE COMPANY

3 = DEACTIVATE PROFILE

8. Once prompted, type in BE0010001 to login to the new company.

Code: [Select]
------------------------------------------------------------------------

------

SELECT ACTIVATION

1 = CHANGE PASSWORD

2 = CHANGE COMPANY

3 = DEACTIVATE PROFILE

-----------------------------------------------------------------------

-------

25 SEP 2013 13:36:18 USER (14 APR) SEAT.USER [3694,49]

ACTION BE0010001

PLEASE KEY IN COMPANY CODE


9. Now, you are into the new company.

Code: [Select]
Belgium SELECT APPLICATION

------------------------------------------------------------------------

------
------------------------------------------------------------------------

------

25 SEP 2013 13:38:16 USER (14 APR) SEAT.USER [3694,49]

ACTION

AWAITING APPLICATION

Post setup:
Post setup is unnecessary for those who want to create a company just to login to.
Below are bare minimum activities to be done as part of post creation of a
company. There are quite a number of files to check on as per the manual but we
choose to ignore them as of now.
1. Input and Authorise IHLD records in the below tables. In case you receive any
overrides while in input mode, accept them.

a. DATES
b. BATCH
c. REVALUATION.PARAMETERIf you look at BATCH records, you will find that there
are around 260 records in IHLD. You may use EBS.AUTO.FUNCTION to input and authorise
the records unless you have all the patience in the world to input and authorise the records one
by one.

How to post a message to JMS queue


July 10, 2013, 05:03:06 PM by t24learner
1. Overview

This blog will describe on how to post a message from jBASIC program to a JMS queue using
TOCF(EE) component. This is achieved by activating one of the Message driven bean or MDB
provided by Temenos using CALLJEE from a program. As the message is posted from T24
server to the Application server, this is an inbound connection setup.

2. Prerequisites
1.All TOCF(EE) components deployed in application server. A perfectly running T24 Browser in
JMS mode will ensure that TOCF(EE) components are good to go.
2.All jar/war/ear components of TOCF(EE) are extracted and the deployment descriptors are
editable.
3.Proper setup of JAVA and environment variable JAVA_HOME pointing to the correct path.
4.Basic knowledge on jBASIC programming and T24 administration.

3.Descriptor changes

3.1 Changes to ra.xml(..deploy\tocfT24ra-ra.rar\META-INF)

Locate and change the below line in this file. This ensures that TOCF(EE) is configured for
accepting inbound connections.

<resourceadapter>
<resourceadapter-class>com.temenos.tocf.t24ra.T24ResourceAdapter</resourceadapter-
class>
<!-- ResourceAdapter default configuration properties -->
<config-property>
<description>Inbound listener server name (empty = bind to all
addresses)</description>
<config-property-name>listenHost</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
<config-property>
<description>Inbound listener port number (0 = inbound listener
disabled)</description>
<config-property-name>listenPort</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
<!-- Inbound listener is disabled by default (port=0). Set to e.g. 55006 to enable inbound
listener -->
<config-property-value>55006</config-property-value>
</config-property>

3.2 Changes to remote.cmd or .profile(..bnk/bnk.run)

Set the below environment variables to point to the server where the application server is
installed.

JREMOTE_INBOUND_HOST = "127.0.0.1" (This should point to the server IP where the app
server is installed. This will not be 127.0.0.1 in 99% of setups in production)
JREMOTE_INBOUND_PORT = "55006" (This is default port as present in ra.xml file shown in the
last section. Change if necessary)

3.3 Changes to jboss.xml (..deploy\tocfee.ear\delivery-ejb.jar\META-


INF)

The below change would not be required in most of the cases as these are default queues
setup in the descriptor file.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN"


"http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">

<jboss>
<enterprise-beans>
<message-driven>
<ejb-name>DeliveryMDB</ejb-name>
<resource-adapter-name>tocfT24ra-ra.rar</resource-adapter-name>
<resource-ref>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<jndi-name>java:/ConnectionFactory</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>queue/requestQueue</res-ref-name>
<jndi-name>queue/requestQueue</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>queue/responseQueue</res-ref-name>
<jndi-name>queue/responseQueue</jndi-name>
</resource-ref>
</message-driven>
</enterprise-beans>
</jboss>

3.4 Changes to t24-destination-services.xml(..deploy/)


Since we are using a new JMS queue, include the queue information in t24-destination-
services.xml. Application server will create the queue based on this descriptor.

<mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=requestQueue">
<depends optional-attribute-
name="DestinationManager">jboss.mq:service=DestinationManager</depends>
</mbean>

Now configuration changes are over. Let's head to write a program to push our message to a
JMS queue.

4. jBC program

Code: [Select]
PROGRAM SEND.MSG.TO.JMS

$INSERT T24.BP I_COMMON

$INSERT T24.BP I_EQUATE

$INSERT JBC.h

ACTIVATION = "DELIVERY"

INFO = ""

INFO<1> = "MESSAGE_TO_JMS"

INFO<2> = "MSG_ID"

INFO<3> = "SYNC"

INFO<4> = "3000"

INFO<11> = "First message"

INFO<12> = "Second message"

ERROR.CODE = CALLJEE(ACTIVATION, INFO)

IF ERROR.CODE NE 0 THEN
CRT "[FAILED] Error code: ":ERROR.CODE
CRT "MESSAGE SENT TO JMS QUEUE"

END
STOP

5. Verification

In order to verify if the message has reached the destination, use explorer provided by the
application server to query the JMS queue. In jBOSS, this can be done using JMX.console--
>jboss.mq.destination and clicking on "name=requestQueue,service=Queue". Then click on
appropriate button to invoke java.util.List listMessages() to view the messages.
How to write messages to MQ from a jBASIC Program
June 25, 2013, 01:47:41 PM by t24learner

1 Overview

This blog will provide an overview on the configuration setup required for posting and retrieving
MQ messages from a jBASIC program.

2 Prerequisites

 TAFC/TAFJ(Setup not explained)


 IBM WebSphere® MQ 7 or above.
 Basic MQ Bridge APIs
 Java 1.3.1 or above(Setup not explained)

3 Setting up Basic MQ Bridge

The BASIC MQ Bridge library (basicmqbridge.jar) is a java library offering methods to post and
retrieve messages to and from MQSeries from jBASE BASIC. The message along with MQ
message descriptors can be passed in a single XML based structure.

The following files are required.

- basicmqbridge.jar
- connector.jar
- com.ibm.mq.jar
- log4j-1.2.7.jar
- tcommon.jar

If web sphere MQ release version is more than 7, we need to use following files too.

- com.ibm.mq.commonservices.jar
- com.ibm.mq.headers.jar
- com.ibm.mq.jmqi.jar

These above files can be obtained within installation folder of TCServer in the /lib or /ext
directory. There can be copied wherever needed. (eg : in a bnk.run/MQLIB directory)

The environment variable CLASSPATH must be set to point to the file basicmqbridge.jar
Eg :

For UNIX, in .profile add the below line.


export CLASSPATH=$CLASSPATH:$HOME/MQLIB/basicmqbridge.jar

3.1 API

The Basic MQ Bridge has 1 “visible” class and 2 static methods:

Class : com.temenos.tocf.mqb.MQBridge
Method:
Post (String): String
Get (String): String

In order to invoke these methods from BASIC, we need to use CALLJ function like below:

CALLJ "com.temenos.tocf.mqb.MQBridge", "$Post", param SETTING ret


CALLJ "com.temenos.tocf.mqb.MQBridge", "$Get", param SETTING ret

The param value will be an XML based message containing all the information the BASIC MQ
Bridge will need to process the request (Post or Get).

4 Posting a message
A sample program to post a message from jBASIC is shown below. If <mqhost> tag is left
empty, it means that MQSeries server is on the current machine, and type of connection is a
native (server) connection.

PROGRAM MQ.POST
$INSERT T24.BP I_COMMON
$INSERT T24.BP I_EQUATE
PSNHOST = "127.0.0.1(1414)"
PSNQNAME = "INQUEUE"
PSNQMGR = "QMANAGER"
PSNCHANNEL = "CHANNEL1"
MSG.TO.POST = "THIS MESSAGE HAS BEEN POSTED FROM jBASIC"
FORMATTER = "sample.SampleFormatter"
GOSUB WRAP2MQ
ERROR.CODE = ""
ERROR.TEXT = ""
RETURN.CODE = "1"

CALLJ "com.temenos.tocf.mqb.MQBridge","$Post", MQ.PARAM SETTING


MQ.UID ON ERROR
RETURN.CODE = 0
GOSUB CATCH.ERROR
END

IF ERROR.CODE EQ "" THEN IF MQ.UID[1,7] EQ "FAILURE"


THEN RETURN.CODE = "9" ERROR.CODE =
"99" ERROR.TEXT = MQ.UID END END

IF RETURN.CODE EQ "1" THEN


CRT "MESSAGE POSTED SUCCESSFULLY.MESSAGE ID IS: " : MQ.UID
END

RETURN
*---------------------------------------------------------------------
---------------------------
WRAP2MQ:
* Wrap the message within the XML param for MQ
* Mandatory parameters population

MQ.PARAM = ""
MQ.PARAM := "<mqbridge>"
MQ.PARAM := " <mqhost>":PSNHOST:"</mqhost>"
MQ.PARAM := " <mqqueue>":PSNQNAME:"</mqqueue>"
MQ.PARAM := " <mqmanager>":PSNQMGR:"</mqmanager>"
MQ.PARAM := " <mqchannel>":PSNCHANNEL:"</mqchannel>"
MQ.PARAM := " <message>":MSG.TO.POST:"</message>"
MQ.PARAM := " <userid></userid>"
MQ.PARAM := " <basicCharset></basicCharset>"
MQ.PARAM := " <mqCharset></mqCharset>"
MQ.PARAM := " <formatter>":FORMATTER:"</formatter>"
MQ.PARAM := "</mqbridge>"
CRT MQ.PARAM
RETURN
*---------------------------------------------------------------------
---------------------------
CATCH.ERROR:
CRT ERROR.CODE = SYSTEM(0)
BEGIN CASE
CASE ERROR.CODE = 1
ERROR.TEXT = "CALLJ Fatal error creating thread."

CASE ERROR.CODE = 2
ERROR.TEXT = "Cannot find the JVM"

CASE ERROR.CODE = 3
ERROR.TEXT = "Cannot find class"

CASE ERROR.CODE = 4
ERROR.TEXT = "CALLJ Unicode conversion error."

CASE ERROR.CODE = 5
ERROR.TEXT = "Cannot find method"

CASE ERROR.CODE = 6
ERROR.TEXT = "Cannot find object constructor"

CASE ERROR.CODE = 7
ERROR.TEXT = "Cannot instantiate object"
END CASE

RETURN
END
OUTPUT:

Code: [Select]
<mqbridge> <mqhost></mqhost> <mqqueue>INQUEUE</mqqueue>

<mqmanager>QMANAGER</mqmanager> <mqchannel>CHANNEL1</mqchannel>

<message>THIS MESSAGE HAS BEEN POSTED FROM jBASIC</message>

<userid></userid> <basicCharset></basicCharset> <mqCharset></mqCharset>

<formatter>sample.SampleFormatter</formatter></mqbridge>

MESSAGE POSTED SUCCESSFULLY.MESSAGE ID IS:

QU1RIFQyNFFNICAgICAgICcJu1EgMGMD

5 Retrieving a message

Retrieving a message follows the same philosophy than posting one.


The main differences are:
1. No <mqmd> tag is required
2. The <messageID> tag.
3. The <correlationID> tag
4. The <timeout> tag

If a messageID is specified, then only the message matching this ID will be retrieved. If no
such message is available, the BASIC MQ Bridge will wait for this message up to the number
of seconds specified in the <timeout> tag. If no timeout is specified, or the timeout equals to 0,
the waiting time is unlimited.

If no messageID is specified but a correlationID, the same logic will apply with the
correlationID. If neither the messageID nor the correlationID, the first available message will be
returned.

Warning:
If you want retreive message posted by the MQBridge post you need to set/”retreive by” a
correlationId. In fact, the messageId is encoded in base 64 for compatibility reason with Basic
code and the correlation is not decode in Base64 for WMQ compatibility reason.
Note:
When retrieving a message, the encoding value of the message is native
(MQC.MQENC_NATIVE) and the character set is assumed being the same as the Queue
Manager (MQC.MQCCSI_Q_MGR).

Below is a sample BASIC program retrieving a message available in the MQ. Note that you
don’t need to do anything to compile these programs. CALLJ is a standard BASIC keyword in
jBASE.

PROGRAM MQ.GET
$INSERT T24.BP I_COMMON
$INSERT T24.BP I_EQUATE
PSNHOST = ""
PSNQNAME = "INQUEUE"
PSNQMGR = "QMANAGER"
PSNCHANNEL = "CHANNEL1"
CORRELATION.ID = ""
TIME.OUT = "10"
MSG.ID = ""

GOSUB WRAP2MQ
ERROR.CODE = ""
ERROR.TEXT = ""
RETURN.CODE = "1"
CALLJ "com.temenos.tocf.mqb.MQBridge","$Get",MQ.PARAM SETTING
MQ.UID ON ERROR
RETURN.CODE = 0
GOSUB CATCH.ERROR
END

IF ERROR.CODE EQ "" THEN IF MQ.UID[1,7] EQ "FAILURE"


THEN RETURN.CODE = "9" ERROR.CODE =
"99" ERROR.TEXT = MQ.UID END END
IF RETURN.CODE EQ "1" THEN
CRT Message : :MQ.UID
END
RETURN
*---------------------------------------------------------------------
---------------------------
WRAP2MQ:
* Wrap the message within the XML param for MQ
* Mandatory parameters population

MQ.PARAM = ""
MQ.PARAM := "<mqbridge>"
MQ.PARAM := " <mqhost>":PSNHOST:"</mqhost>"
MQ.PARAM := " <mqqueue>":PSNQNAME:"</mqqueue>"
MQ.PARAM := " <mqmanager>":PSNQMGR:"</mqmanager>"
MQ.PARAM := " <mqchannel>":PSNCHANNEL:"</mqchannel>"
MQ.PARAM := " <messageId>":MSG.ID:"</messageId>"
MQ.PARAM := " <correlationId>":CORRELATION.ID:"</correlationId>"
MQ.PARAM := " <timeout>":TIME.OUT:"</timeout>"
MQ.PARAM := "</mqbridge>"
CRT MQ.PARAM
RETURN
*---------------------------------------------------------------------
---------------------------
CATCH.ERROR:
ERROR.CODE = SYSTEM(0)
BEGIN CASE
CASE ERROR.CODE = 1
ERROR.TEXT = "CALLJ Fatal error creating thread."

CASE ERROR.CODE = 2
ERROR.TEXT = "Cannot find the JVM"

CASE ERROR.CODE = 3
ERROR.TEXT = "Cannot find class"

CASE ERROR.CODE = 4
ERROR.TEXT = "CALLJ Unicode conversion error."

CASE ERROR.CODE = 5
ERROR.TEXT = "Cannot find method"

CASE ERROR.CODE = 6
ERROR.TEXT = "Cannot find object constructor"

CASE ERROR.CODE = 7
ERROR.TEXT = "Cannot instantiate object"
END CASE

RETURN
*---------------------------------------------------------------------
---------------------------
END
OUTPUT:

Code: [Select]
<mqbridge> <mqhost></mqhost> <mqqueue>INQUEUE</mqqueue>

<mqmanager>QMANAGER</mqmanager> <mqchannel>CHANNEL1</mqchannel>

<messageId></messageId></mqbridge>

THIS MESSAGE HAS BEEN POSTED FROM jBASIC


How to enable debugging in JCA
June 14, 2013, 11:47:04 AM by beta

To enable debugging in JCA, allowInput property must be set in t24-ds.xml file in deploy folder
of the application server.

<connection-factories>
<tx-connection-factory>
<jndi-name>jca/t24ConnectionFactory</jndi-name>
<rar-name>TAFC-ra.rar</rar-name>
<connection-definition>com.jbase.jremote.JConnectionFactory</connection-definition>
<config-property name="host" type="java.lang.String">127.0.0.1</config-property>
<config-property name="port" type="int">7000</config-property>
<config-property name="env"
type="java.lang.String">OFS_SOURCE=T24BROWSER</config-
property>
<!-- allow System to be used for debugging, do not use on production systems -->
<config-property name="allowInput" type="java.lang.Boolean">true</config-property>
<!-- If the agent is accepting SSL connections you can enable SSL -->
<config-property name="SSL" type="java.lang.String">false</config-property>
<!-- Enable compression if required -->
<config-property name="compression" type="java.lang.Boolean">false</config-property>
<config-property name="compression_threshold" type="int">1024</config-property>
<!-- configure environment variables -->
</tx-connection-factory>
</connection-factories>
Once this has been set, whenever a ‘DEBUG’ statement is seen in the T24 Server code, the
TAFC debugger can be used via the jBOSS console.
How to call a subroutine from java program
January 28, 2013, 03:17:13 PM by BalajiSundar

Start jAgent:

jRemote is used for connectivity between jBase and Java. Start atleast one agent on a pre-
agreed port number.

jsh-->jbase_agent -p 9494
(1077266|1) NOTICE starting up jAgent, Process Per Connection mode, listening on port 9494,
SocketAcceptor.h +107
(1060866|1) NOTICE RequestHandlerService::open: connected with localhost,
RequestHandlerService.cpp +221
(1060866|1) NOTICE Closing connection to localhost, RequestHandlerService.cpp +127
(1060866|1) NOTICE Shutting down Connection, JAgentSocketServer.cpp +115

Basic code:

Write a small routine which does nothing more than printing a bunch of characters.

Code: [Select]
SUBROUTINE JBASEROUTINE

CRT "This is a text message from jBase"

RETURN

END
jsh-->jshow -c JBASEROUTINE
Subroutine: .. /lib/lib0.so.3
jBC JBASEROUTINE version 10.0 Mon Aug 2 12:33:44 2010
jBC JBASEROUTINE source file .

Java Code:

Save the below code to file javacallingjbaseroutine.java.


Code: [Select]
import com.jbase.jremote.*;

class javacallingjbaseroutine

public static void main (String a[])

{
try
{

DefaultJConnectionFactory cxf = new DefaultJConnectionFactory();

cxf.setHost("127.0.0.1");

cxf.setPort(9494); //This port should match the port jAgent is

listening on

System.out.println("Before getConnection");

JConnection cx = cxf.getConnection();

System.out.println("After getConnection");

JSubroutineParameters params = new JSubroutineParameters();

params.add(new JDynArray(""));

System.out.println("BEFORE CALLING!");

JSubroutineParameters returnParams =

cx.call("JBASEROUTINE",null); // ----> here you are calling Basic

routine.

System.out.println("AFTER CALLING!");

}
catch (JRemoteException e)

{
System.out.println("ERROR"); // error

}
}
}
Compile the Java program:

Compile the java file with class path pointing to jremote.jar file. You will need to include the jar
file by using appropriate setting in case Eclipse is used for programming.

jsh-->javac -cp <TAFC_installed_path>/java/lib/jremote.jar javacallingjbaseroutine.java

Execute the Java program:


jsh-->java -cp .:<TAFC_installed_path>/java/lib/jremote.jar javacallingjbaseroutine

Output:

Before getConnection
After getConnection
BEFORE CALLING!
This is a text message from jBase
AFTER CALLING!
How to replace the world-map (Globus) in classic
December 22, 2012, 02:37:08 PM by awa
Everybody knows the wold-maps when you logon to T24 (Globus) in classic.

But did you know that it can be easily replaced with any text /ascii-art you like ?
Just create a file of 16 rows / 80 characters and name it GLOBUS.BAN in bnk.run, it will be
shown instead of the globe.
Very helpful if you put the name of you env. in this file.

Code: [Select]

/$$$$$$$$ /$$$$$$$$ /$$$$$$ /$$$$$$$$

|__ $$__/| $$_____/ /$$__ $$|__ $$__/

| $$ | $$ | $$ \__/ | $$

| $$ | $$$$$ | $$$$$$ | $$
| $$ | $$__/ \____ $$ | $$

| $$ | $$ /$$ \ $$ | $$

| $$ | $$$$$$$$| $$$$$$/ | $$

|__/ |________/ \______/ |__/

How to configure browser for multiple T24 environments in jBOSS


October 16, 2012, 12:13:37 AM by tSA
Abstract:

The purpose of this blog is to provide an overview on the procedure used to deploy multiple
T24 browsers using jBOSS.

Assumptions:

Below are the assumptions made.

a. There are multiple T24 environments perfectly accessible via T24 classic mode.
b. Server connection mode is JMS.
c. Multiple environments are considered to be R09 UAT and R09 PROD.
d. jBOSS is setup properly and shutdown for this exercise.
e. Consultant possess basic technical knowledge on T24 and jBOSS directory structures.

Required Components:

1. BrowserWeb.war(s)
2. tocfee.ear
3. tocfT24ra-ra.rar

Deployment:

jBOSS tries to deploy any package ending with *.war in deploy folder. The supplied
BrowserWeb.war by Temenos cannot be deployed as such in the deploy folder.It requires
changes to some of the file for successful deployment and usage. As a general practice, the
war files are always found to be extracted in a folder ending with .war so as to make jBOSS
recognize it as a package. Though this practice is perfectly fine, it is to be noted that this is not
the case in a production environment where all the configuration changes to .war file are
made,the pack is rebuilt to a single .war file and deployed in jBOSS deploy folder. This is
specifically to make use of security related features provided by jBOSS where packages are
deployed and undeployed by jBOSS during startup and shutdown respectively.

BrowserWeb.war

Below are the tasks needed to be performed to deploy BrowserWeb.war package.

Note: Step 1 - 4 only demonstrate on how to extract a browser war file. Deployment of
BrowserWebR09.war is not needed for our actual setup.

Step 1: To deploy BrowserWeb.war, create a folder called BrowserWebR09.war under


../default/deploy folder.

Step 2: Copy BrowserWeb.war to the newly created folder.

Step 3: From command prompt in the backend, type in the below command

Code: [Select]
\jboss-4.2.3.GA\server\default\deploy\BrowserWebR09.war>jar -xvf

BrowserWeb.war

This extracts all contents of BrowserWeb.war into BrowserWebR09.war folder. Do not use
Winzip or other compression softwares to do this job. jar utility should be available in most of
the environments where java is installed.
Step 4: Since all the contents are extracted in the folder, the actual .war file can be deleted
from the folder now.Now jBOSS will not delete any configuration files inside this war folder and
the configuration files will be retained for future references.

Now using the above steps as reference, create two BrowserWeb’s namely
BrowserWebPROD.war and BrowserWebUAT.war for the two environments inside the
..default\deploy directory. In case the environments are two different versions of T24 say R10
and R11, use the respective Browserweb.war files provided by Temenos.

tocfee.ear

Place the file in the deploy folder. Extract the .ear package similar to .war package. The result
should be a tocfee.ear folder instead of a file. Inside the tocfee.ear folder, there should be a jar
file by the name ofsmessage-ejb.jar. This jar file is important and will be mentioned in the later
part of the blog.

tocfT24ra-ra.rar

Place this file in the deploy folder. There is nothing to be modified in this rar file. This is a
replacement to resource adapter file jremote-ra.rar from R11 onwards.
Configuration files:

Below are the files that will be modified for our setup.

a. browserParameters.xml (BrowserWeb.war)
b. t24-ds.xml (../default/deploy)
c. t24-destination-services.xml (../default/deploy)
d. ejb-jar.xml (tocfee.ear/ofsmessage-ejb.jar)
e. jboss-web.xml (BrowserWeb.war\WEB-INF)
f. jboss.xml(tocfee.ear/ofsmessage-ejb.jar)

Setup

Step 1: Set the server connection mode as JMS in browserParameters.xml present within both
the BrowserWeb.war folders.

<browserParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<messageData>
<parameter>
<parameterName>Product</parameterName>
<parameterValue>BROWSER</parameterValue>
<!-- Options: BROWSER / ARC-IB -->
</parameter>
<parameter>
<parameterName>Server Connection Method</parameterName>
<parameterValue>JMS</parameterValue>
<!-- Options: INSTANCE / AGENT / JMS -->

Step 2: Set t24ConnectionFactory for each environment in t24-ds.xml file.Here let us take
jca/t24ConnectionFactoryUAT and jca/t24ConnectionFactoryPROD

<!--Test Environment-->
<tx-connection-factory>
<jndi-name>jca/t24ConnectionFactoryUAT</jndi-name>
<rar-name>tocfT24ra-ra.rar</rar-name>
<connection-definition>com.jbase.jremote.JConnectionFactory</connection-definition>
<config-property name="host" type="java.lang.String">127.0.0.1</config-property>
<config-property name="port" type="java.lang.Integer">9595</config-property>
<config-property name="actionTimeout" type="java.lang.Integer">30</config-property>
<!-- configure environment variables -->
<config-property name="envVariables"
type="java.lang.String">OFS_SOURCE=TCS</config-property>
<config-property name="allowInput" type="java.lang.Boolean">true</config-property>
</tx-connection-factory>

<!--Production Environment-->

<tx-connection-factory>
<jndi-name>jca/t24ConnectionFactoryPROD</jndi-name>
<rar-name>tocfT24ra-ra.rar</rar-name>
<connection-definition>com.jbase.jremote.JConnectionFactory</connection-definition>
<config-property name="host" type="java.lang.String">127.0.0.1</config-property>
<config-property name="port" type="java.lang.Integer">9797</config-property>
<config-property name="actionTimeout" type="java.lang.Integer">30</config-property>
<!-- configure environment variables -->
<config-property name="envVariables"
type="java.lang.String">OFS_SOURCE=BROWSERTC</config-property>
<!-- allow System.in to be used for debugging, do not use on production systems -->
<config-property name="allowInput" type="java.lang.Boolean">true</config-property>
</tx-connection-factory>

Step 3: Set Reply and Response queue for each environment in t24-destination-services.xml
file located in deploy folder. This step is very important in JMS mode.

<!--Test Environment-->
<mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=t24OFSQueueUAT">
<depends optional-attribute-
name="DestinationManager">jboss.mq:service=DestinationManager</depends>
</mbean>
<mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=t24OFSReplyQueueUAT">
<depends optional-attribute-
name="DestinationManager">jboss.mq:service=DestinationManager</depends>
</mbean>
<!--Production Environment-->
<mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=t24OFSQueuePROD">
<depends optional-attribute
name="DestinationManager">jboss.mq:service=DestinationManager</depends>
</mbean>
<mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=t24OFSReplyQueuePROD">
<depends optional-attribute-
name="DestinationManager">jboss.mq:service=DestinationManager</depends>
</mbean>

Step 4: Setup two OFSMessageMDB to service two OFS request queues created for UAT
and PROD environments.

To achieve this, ejb-jar.xml and jboss.xml needs to be modified. How ever these configuration
files are present within ofsmessage-ejb.jar which is not accessible readily inside tocfee.ear
folder. In order to access these, we need to extract the jar file,make changes and then create
jar file again.

Extraction of ofsmessage-ejb.jar

a. Create a new folder called temp inside tocfee.ear and move ofsmessage-ejb.jar to this
folder.
b. Extract the contents of the jar file using

Code: [Select]
jar -xvf ofsmessage-ejb.jar

c. Delete the original ofsmessage-ejb.jar file.

Changes to configuration files

ejb-jar.xml

<?xml version="1.0" encoding="UTF-8"?>


<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-
jar_2_1.xsd">
<display-name>OFSMessage</display-name>
<enterprise-beans>
<!--Test Environment-->
<message-driven>
<display-name>OFSMessage Bean</display-name>
<ejb-name>OFSMessageMDBUAT</ejb-name>
<ejb-class>com.temenos.ofsmessage.mdb.OFSMessageMDB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</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>
</activation-config>
<resource-ref>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<description>T24</description>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<res-type>com.jbase.jremote.JConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<description>OFS reply queue</description>
<res-ref-name>queue/t24OFSReplyQueue</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</message-driven>

<!--Production Environment-->

<message-driven>
<display-name>OFSMessage Bean</display-name>
<ejb-name>OFSMessageMDBPROD</ejb-name>
<ejb-class>com.temenos.ofsmessage.mdb.OFSMessageMDB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</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>
</activation-config>
<resource-ref>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<description>T24</description>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<res-type>com.jbase.jremote.JConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<description>OFS reply queue</description>
<res-ref-name>queue/t24OFSReplyQueue</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</message-driven>
</enterprise-beans>
</ejb-jar>

jboss.xml

<?xml version="1.0" encoding="UTF-8"?>


<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
<jboss>
<enterprise-beans>
<!--Test Environment-->
<message-driven>
<ejb-name>OFSMessageMDBUAT</ejb-name>
<destination-jndi-name>queue/t24OFSQueueUAT</destination-jndi-name>
<resource-ref>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<jndi-name>java:/ConnectionFactory</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>queue/t24OFSReplyQueue</res-ref-name>
<jndi-name>queue/t24OFSReplyQueueUAT</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<jndi-name>java:jca/t24ConnectionFactoryUAT</jndi-name>
</resource-ref>
</message-driven>

<!--Production Environment-->

<message-driven>
<ejb-name>OFSMessageMDBPROD</ejb-name>
<destination-jndi-name>queue/t24OFSQueuePROD</destination-jndi-name>
<resource-ref>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<jndi-name>java:/ConnectionFactory</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>queue/t24OFSReplyQueue</res-ref-name>
<jndi-name>queue/t24OFSReplyQueuePROD</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<jndi-name>java:jca/t24ConnectionFactoryPROD</jndi-name>
</resource-ref>
</message-driven>
</enterprise-beans>
</jboss>

Rebuild of ofsmessage-ejb.jar

Note: This step can be ignored if setup is not done in production server.
Since all the necessary files have been amended, repack ofsmessage-ejb.jar by following the
below steps.

a. From inside the temp folder issue the below command


Code: [Select]
jar -cvf ofsmessage-ejb.jar *

b. The above step would have created ofsmessage-ejb.jar. Move the jar file to a level up ie
immediately inside tocfee.ear folder.
c. Delete temp folder.

Step 5: Setup jboss-web.xml files present in each of the BrowserWeb.war files.

BrowserWebUAT.war

<?xml version="1.0" encoding="UTF-8"?>


<jboss-web>
<resource-ref>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<res-type>com.jbase.jremote.JConnectionFactory</res-type>
<jndi-name>java:jca/t24ConnectionFactoryUAT</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<res-type>javax.jms.ConnectionFactory</res-type>
<jndi-name>java:/ConnectionFactory</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>queue/t24OFSQueue</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<jndi-name>queue/t24OFSQueueUAT</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>queue/t24OFSReplyQueue</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<jndi-name>queue/t24OFSReplyQueueUAT</jndi-name>
</resource-ref>
</jboss-web>

BrowserWebPROD.war

<?xml version="1.0" encoding="UTF-8"?>


<jboss-web>
<resource-ref>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<res-type>com.jbase.jremote.JConnectionFactory</res-type>
<jndi-name>java:jca/t24ConnectionFactoryPROD</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<res-type>javax.jms.ConnectionFactory</res-type>
<jndi-name>java:/ConnectionFactory</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>queue/t24OFSQueue</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<jndi-name>queue/t24OFSQueuePROD</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>queue/t24OFSReplyQueue</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<jndi-name>queue/t24OFSReplyQueuePROD</jndi-name>
</resource-ref>
</jboss-web>

Start up of Agents

Now that we have deployed and configured our components, we are at the last stage of
establishing connection.

As configured in t24-ds.xml, port 9595 is set for UAT and port 9797 for PROD. Start tafc_agent
from jshell prompt in the respective environments

UAT:

Code: [Select]
tafc_agent -p 9595

PROD:

Code: [Select]
tafc_agent -p 9797

Now, both the agents are listening on the intended ports for oncoming requests from browser
clients.
jBOSS Startup

Start jBOSS using command

Code: [Select]
run.bat -b 0.0.0.0

- Windows

Code: [Select]
run.sh -b 0.0.0.0

- UNIX

Browser Connectivity
Both the browser links can be access using links

http://<ipaddress_of_webserver>:9090/BrowserWebR09UAT/servlet/BrowserServlet
http://<ipaddress_of_webserver>:9090/BrowserWebR09PROD/servlet/BrowserServlet

It is assumed that 9090 is the port mentioned in server.xml present in ..default\deploy\jboss-


web.deployer

UAT:

PROD:

Now, we have successfully configured browser for multiple T24 environments in jBOSS.
How to write a 'Hello World' program in jBasic
August 19, 2012, 03:28:35 PM by t24learner
This blog explains how to write the simplest 'Hello World' program in jBasic.

Go to jShell prompt and type the below


-->JED LOCAL.BP HELLOWORLD
*File LOCAL.BP , Record 'HELLOWORLD'

Code: [Select]
PROGRAM HELLOWORLD

CRT 'HELLO WORLD'

END
Once done, compile and catalog the program using FIBC command or the traditional BASIC
and CATALOG commands. Once done, type HELLOWORLD in jShell prompt to get the below
output.

Output:

Code: [Select]
HELLO WORLD

Das könnte Ihnen auch gefallen