Debugging a Mediator Java callout

The Mediator component in Oracle SOA Suite allows to define a Java callout. With a Java callout message payloads or anything else can be manipulated when routing rules are processed by Mediator. In our particular case we track information about faults occurred in a sequential Mediator component. A Java callout has to implement the interface

This interface defines a number of functions the can be used to plug-in in the corresponding Mediator lifecycle. For more information about the Java callout please consult the Oracle documentation (Chapter How to Use Java Callouts).

In order to use the Java callout you have to specify the Java class implementing the Interface IjavaCallout in the corresponding Mediator component in your composite.

Mediator Java callout

The Java callout have to be deployed on the SOA Suite server. This can be achieved in two ways. First one is to place the jar file containing the Java callout in the directory $DOMAIN_HOME/lib. WebLogic Server will automatically all jar files in this directory. The second way is to provide the jar file $ORACLE_HOME/Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1. In this directory an Apache ANT script has to be executed so that the new jar file will be added to the class path.

So this steps are very easy, but what if the Java callout doesn’t work as expected? For analyzing such issues a good way is to debug the Java callout directly in JDeveloper. The next steps describing the configuration to enable debugging of a Java callout.

1. Open the file $DOMAIN_HOME/bin/ with a text editor. Add the following statement before the line WL_HOME=

Enable remote debugging in WebLogic server

2. Restart WebLogic Server. Please ensure that the debugging options are correctly set.

Enable remote debugging in WebLogic Server

3. Open JDeveloper with the project containing the Java callout. Navigate to the project settings and select Run/Debug/Profile. Click on the Button <Edit> to modify the selected profile.

JDeveloper configuration

4. Enable the option “Remote debugging” in Launch Settings.

JDeveloper configuration

5. Navigate to Tool Settings > Debugger > Remote.

Select Attach to JPDA from the drop down list from Protocol. Enter the host running WebLogic Server in debug mode and enter 8453 as port.

JDeveloper configuration

6. Define a breakpoint in the Java callout and start a remote debugger session.

JDeveloper start remote debugging session

7. Test an already deployed composite using a Mediator with the Java callout definition. JDeveloper will stop on the previously defined break point and now the Java callout can be debugged.

JDeveloper debug session started


Set remote debugging in JDeveloper + WebLogic Server by Anastasiya Minich-Tuzik