Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

TAF J Browser Debugging using an Application server

Pre-requisites:

 A pre configured JBoss Application server with TAFJ in place


 A pre configured Eclipse setup with TAFJ in place
 BROWSER.LISTEN basic program

Starting up Application server :

Before starting the JBoss Application server, we need to make sure to remove TAFJ MDB
(TAFJJEE_EAR.ear) from "<JBOSS_HOME>/standalone/deployments" folder. This MDB consumes the
messages on associated JMS queues coming from browser. We need to remove this MDB before
starting the Application server to make sure, we consume the browser request one after other in the
Debug mode.

Starting up the App server by running standalone.bat/ standalone.sh depending on the underlying
operating system along with the standalone profile name as shown below from <JBOSS_HOME>/bin.

CALL standalone.bat --server-config=standalone-full.xml -b 0.0.0.0

Once started without any exceptions on the server console, we are ready now to accept requests
from the browser.

Setup in Eclipse :

Assuming there is an existing project in Eclipse toggled with TAFJ nature. Please refer to the
appropriate document for creating/managing projects inside the Eclipse with TAFJ nature.
Add a new BASIC routine to the project called BROWSER.LISTEN and try compiling it.

The BASIC routine BROWSER.LISTEN is a customized routine for TAFJ , which has a capability to listen
on associated JMS queues on specified Application server.

Please get the routine BROWSER.LISTEN from the TAFJ installation folder under
<TAFJ_HOME>/appserver/basic/TAFJ.BP

Note: jbossall-client.jar which can be found under <JBOSS_HOME>/bin/client folder need to be


copied in the <TAFJ_HOME>/ext folder.

A Close look @ BASIC routine :

PROGRAM BROWSER.LISTEN

The java.naming.provider.url needs to be changed to appropriate IP address and RMI port where
the JBoss Application server is running. (if the App server is not running on localhost with default
port).

Debugging in Eclipse :

To start debugging , we put a break point on the routine we need to debug, say for example
OFS.BULK.MANAGER @ line 258.

To put a break point, open the Routine in the BASIC Editor and double click on the grey line next to
the line number. Once a break point is set, you should be able to see a filled circle in the same line
number and vice versa, double click on the same to remove the break point.

NOTE : There is no need of compiling the Routine again after putting the breakpoints. Breakpoints
can be put /removed on fly.

Debugging options in Eclipse:

F5 : step in , F6 : step over , F7 : step return , F8 : continue

Once, we are done with putting a break point we launch the BROWSER.LISTEN program in debug
mode. (right click on the program - > Debug as -> BASIC PROGRAM)
Once the program is launched, place a browser request using the normal browser URL and we see
the control hitting the break point for the instructions there after.
Configuration to connect directly a jBOSS server (T24 Browser)
to another jBOSS Server (T24)

Introduction

This document describe the configuration required to connect directly a jBOSS server (T24 Browser) to
another jBOSS Server (T24) without a 3rd party middle broker or MQ in between.

This configuration may be used during POC or for environment that does not require resilience, high-
availability or performance capabilities.

Diagram
Release
The below configuration has been tested successfully with :
TAFJ/T24
JBOSS 6.4 EAP
Linux

The only configuration to do :


A) Deploy T24 Browser on the JBOSS (T24 Browser) server.
B) Edit the standalone-full.xml file on the JBOSS (T24Browser) server :
(This file is located in JBOSS_HOME\standalone\configuration\standalone-full.xml)
Deactivate HornetQ security (to simplify)
<hornetq-server>
<persistence-enabled>false</persistence-enabled>
<security-enabled>false</security-enabled>
1) Deactivate the default Connection Factory definition by adding IGNORE:
<connection-factory name="InVmConnectionFactory">
<connectors>
<connector-ref connector-name="in-vm"/>
</connectors>
<entries>
<entry name="java:/ConnectionFactory_IGNORE"/>
</entries>
</connection-factory>
2) Add a new connection-factory
<connection-factory name="hornetq-ra-t24">
<connectors>
<connector-ref connector-name="netty-t24"/>
</connectors>
<entries>
<entry name="java:/ConnectionFactory"/>
</entries>
</connection-factory>
3) Defined associated connector
<netty-connector name="netty-t24" socket-binding="messaging-t24"/>
4) Define a new socket-binding
<outbound-socket-binding name="messaging-t24">
<remote-destination host="IP address TAFJ/T24 server" port="5445"/>
</outbound-socket-binding>
5) Launch JBoss with the following options :
%JBOSS_HOME%\bin\standalone.bat --server-config=standalone-full.xml -b 0.0.0.0
C) Edit the standalone-full.xml file on the JBOSS (TAFJ/T24) server :
(This file is located in JBOSS_HOME\standalone\configuration\standalone-full.xml)
6) Deactivate HornetQ security (to simplify)
<hornetq-server>
<persistence-enabled>false</persistence-enabled>
<security-enabled>false</security-enabled>
7) Ensure that in the server and JMS server we have the right port configured (eg 5445)
<socket-binding name="messaging" port="5445"/>
<socket-binding name="messaging-throughput" port="5455"/>

You might also like