Logging exceptions

This recipe explains how to log exceptions from the BPEL process to the logfiles. We will examine how to log exceptions from the Java Embedding activity and how to log faults to the logfiles.

Getting ready…

To complete this recipe, we need to create an empty composite. Also, we need an empty synchronous BPEL 2.0 process.

To log the exceptions, we will extend the logger we defined in the Creating a custom logger in a BPEL process recipe of Chapter 3, Advanced Tracing and Logging. In this recipe, we will also reuse the logging configuration created in that recipe. We extend the LogTheBpelExt class by adding an additional method called logException as shown in the following code:

public static final void logException(String msg, Exception ...

Get BPEL and Java Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.