Professional Documents
Culture Documents
Debugger
R18
TAFJ-JBC-R e m o t e-D e b u g g e r
Amendment History:
Revisio
Date Amended Name Description
n
Page 2
TAFJ-JBC-R e m o t e-D e b u g g e r
Copyri g h t
Copyright (c) 2017 TEMENOS HOLDINGS NV
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-JBC-R e m o t e-D e b u g g e r
Table of Contents
Copyright................................................................................................................................................ 3
Errata and Comments............................................................................................................................. 3
Introduction............................................................................................................................................. 5
Pre requisites:........................................................................................................................ 5
Debugging sessions in the Application Server...................................................................... 5
Options............................................................................................................................... 7
Debugging JBC code called from java.................................................................................. 8
Page 4
TAFJ-JBC-R e m o t e-D e b u g g e r
Intro d u c t i o n
Since the beginning of TAFJ and the adoption of Eclipse as IDE for JBC developers, the
ability of being able to debug JBC has been made available. Putting breakpoints,
introspecting variable or expression values, changing variables values where some of the
basic functionalities. However, all these features where possible only if the main
“PROGRAM” was launched from the IDE. Debugging the T24 Browser has only been made
available by launching BROWSER.LISTEN. In fact, this program is doing nothing else than
taking the messages being posted in the Browser Queue and processing them. In other term,
everything was processed as a normal JBC program.
This document will describe 2 *NEW* possibilities having been made available in the
ECLIPSE IDE.
The first one is the ability to remotely connect eclipse to the Application Server and being
able to debug all JBC sessions
The second one is the ability to put the IDE in “listen” mode and being able to debug JBC
routines having been invoked from java (T24 API)
Pre req u i s i t e s :
This document is for JBC developers knowing the Eclipse IDE and having a good knowledge
of the Debug facilities. This document will not describe in details the debugging facilities;
these features are already described in the “TAFJ Eclipse” document.
De b u g g i n g se s s i o n s in th e Appli c a t i o n Serv e r
First, this document will concentrate of jBoss app server. Anything described for jBoss
should work the same in any other app server. However, at the time of this document is
written, it has only been tested on JBoss EAP 7.0.0.GA
In order to be able to debug your T24 running in an application server, you first need to let
your app server know that you want to be able to debug it. For that, you have to specify a
debugging port using the option “jbc.debug” like this :
-Djbc.debug=<a_free_tcp_port>
Page 5
TAFJ-JBC-R e m o t e-D e b u g g e r
In Eclipse, use the run menu and choose “debug configuration ...”
You will have a window asking you which type of debug configuration you wish to create.
Choose JBC Remote like this :
You will have a configuration page for JBC Remote like this :
Page 6
TAFJ-JBC-R e m o t e-D e b u g g e r
Container project : Choose the project in which you have the sources corresponding to
what is deployed in the app server. BY selecting “Browse...” only the projects having the
TAFJ Nature will be listed.
Host : Put the host name or IP on which your app server is running
Port : Put the TCP port you specified in -Djbc.remote …. on your app server.
Connection Timeout (secs) : You could well launch the Debug targhet before your app
server. In that case, Eclipse will wait until the app server is available. This field indicates after
how many seconds it should stop waiting.
Optio n s
Redirect Output : Normally, when running in an app server, CRT and PRINT are de-
activated. However when debugging, this could be good to see those outputs in your Eclipse
IDE. This checkbox should be always ticked.
Put eclipse in listen mode : This option is for debugging the API and will be described in
the next chapter.
Once you specified all those fields give a name to the configuration, click apply and debug.
Page 7
TAFJ-JBC-R e m o t e-D e b u g g e r
At that point, you are debugging whatever runs (JBC) on your app server.
As soon as you stop your debug target, this will not stop the app server, instead, this will
disconect from it and let it run as normal.
In some specific circumstances, the JBC code is not deployed in an app server, and the start
point in not JBC. This situation occurs when doing API. In that case, the developer will
launch a java POJO which invokes JBC code. If the invocation is “remote”, then the JBC
code is deployed in an app server and the previous method to debug it is the correct one.
However, is the invocation is “local”, we need to put eclipse is “listen” mode and tell JBC to
connect to Eclipse as soon as it is invoked. To do that, check the “Put eclipse in listen mode”
in your lunch configuration. Doing that means that the “host” field becomes irrelevant. Then
simply launch your target :
Page 8
TAFJ-JBC-R e m o t e-D e b u g g e r
TestGetAccountBalance.java is calling a JBC routine, and as soon as it enter it, you will see
in your console :
Page 9
TAFJ-JBC-R e m o t e-D e b u g g e r
And if you did put a break point in the JBC, you will see that in your Debug view :
Page 10