Can I debug a custom task in IM ? [Keywords : debugger, JPDA, jdb, jswa]

Can I debug a custom task in IM ? [Keywords : debugger, JPDA, jdb, jswa]

book

Article ID: KB0091501

calendar_today

Updated On:

Products Versions
TIBCO IntegrationManager -
Not Applicable -

Description

Resolution:
Yes you can debug custom tasks, but outside of IM. You would need to make use of a third party debugger tool based on JPDA - Java Platform Debugger Architecture. You can debug process flows within IM, by starting the debugger within IM editor. When you hit a custom task in the process flow, control gets transferred to this third party debugger tool. You can then debug this custom task. Once you are done, control again gets transferred to IM debugger. This whole setup can work pretty seamlessly.

You can get a list of third party debugger tools from here..

http://java.sun.com/products/jpda/using.html

Some of them are actually IDEs, while some are purely debugger tools. I found JSwat interesting. JSwat is licensed under the GNU General Public License which makes it freely available in both binary and source code form. You can download JSwat from...

http://bluemarsh.com/java/jswat/


Here are the steps to be followed...

1.Compile the custom task using the -g option
javac -g &ltcustomtask.java>


2.For this whole debugging process to work the IM JVM and the third party debugger tool need to talk to each other. The third part debugger tool would need to attach to IM JVM. This can be done via two transports...
-Socket
-shared memory


3.Socket Transport:
If you wish to choose socket transport(Solaris & Win32 platform), You would need to start IM with the following JVM option...
-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n

when you start the IM editor you will see the following line printed on the console...
Listening for transport dt_socket at address: 2317

Use this address as the port number in the third party debugger tool. The tool will then attach to the IM JVM. Set your breakpints in the process flow and in the custom task and start debugging


4.Shared Memory transport:
If you wish to choose shared memory transport(Win32 platform), You would need to start IM with the following JVM option...
-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=n

when you start the IM editor you will see the following line printed on the console...
Listening for transport dt_shmem at address: javadebug

Use this address as the shared memory name in the third party debugger tool. The tool will then attach to the IM JVM. Set your breakpints in the process flow and in the custom task and start debugging.


5.You can also debug the custom task using the command line utility 'jdb'. You can get more details from the java sun web site. Using the command line is tedious and painful.

Issue/Introduction

Can I debug a custom task in IM ? [Keywords : debugger, JPDA, jdb, jswa]

Environment

Product: TIBCO IntegrationManager Version: 4.5.0 OS: All --------------------