0% found this document useful (0 votes)
30 views11 pages

Java Extension Multithread Service

The document outlines a workshop on creating a multithreaded service in Java that prints customer names and IDs using hooks in T24. It includes instructions for implementing the ServiceLifecycle interface, writing Java code for the service, and setting up the environment in jBoss. The expected output is a display of customer information filtered by language criteria.

Uploaded by

prakashangadi262
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views11 pages

Java Extension Multithread Service

The document outlines a workshop on creating a multithreaded service in Java that prints customer names and IDs using hooks in T24. It includes instructions for implementing the ServiceLifecycle interface, writing Java code for the service, and setting up the environment in jBoss. The expected output is a display of customer information filtered by language criteria.

Uploaded by

prakashangadi262
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Java Extension Multithread Workshop:-Service Hooks in Java

1)Write a Multithread Routine To print Customer Name and Customer Id By using Hooks
Services in java
Services in T24

• Multithreaded processes

• Must implement com.temenos.t24.api.hook.system.ServiceLifecycle

• Equivalent of LOAD – initialize() SELECT – getIds() or getTableName() RECORD – process() or


inputRecord()

DEMO- Service Simple Service that displays the Customer ID and Customer Name, where the
Language should be “1”

Excepted Output:-

EB.API Record for BATCH.JOB.NAME


Create Project

Create Package

Create the class

And Write below java code


package com.multithread;

import java.util.List;

import com.temenos.t24.api.complex.eb.servicehook.ServiceData;
import com.temenos.t24.api.hook.system.ServiceLifecycle;
import com.temenos.t24.api.records.company.CompanyRecord;
import com.temenos.t24.api.records.customer.CustomerRecord;
import com.temenos.t24.api.system.DataAccess;

public class MultiService extends ServiceLifecycle {


DataAccess yDataAccess = new DataAccess(this);
@Override
public List<String> getIds(ServiceData serviceData, List<String>
controlList) {
// TODO Auto-generated method stub
CompanyRecord yCompRec = new CompanyRecord(this);
List<String> idList = null;
String yCompMne = yCompRec.getFinancialMne().getValue();
idList = yDataAccess.selectRecords(yCompMne, "CUSTOMER", "", "WITH
LANGUAGE EQ '1'" );
return idList;
}

@Override
public void initialise(ServiceData serviceData) {
// TODO Auto-generated method stub
System.out.println("Customer List");
}

@Override
public void process(String id, ServiceData serviceData, String
controlItem) {
// TODO Auto-generated method stub
String yCustId =id;
CustomerRecord yCustRec = new
CustomerRecord(yDataAccess.getRecord("CUSTOMER", yCustId));
String yCustName = yCustRec.getName1().toString();
System.out.println("Customer Id :" + yCustId );
System.out.println("Customer Name :" + yCustName );
}

}
• Create the JAR.

• Add the JAR to the jBoss module.xml and restart jBoss


EB.AP
SERVICE.DEMO.LOAD
I,
Make Entry in BATCH

Make Entry in TSS


Note: While running service – Service.Control should be Start
Run the Services

You might also like