Debugging Batch Programs

The Batch Launcher can also be used as a way of running/debugging or testing batch programs in your IDE.

Add a new Java class in EJBServer project which wraps the BatchLauncher class in the CuramSDEJ project. This newly added class should have a main() method, which delegates straight through to the main() method of the curam.util.impl.BatchLauncher class in the CuramSDEJ project. For example:

public static void main(String[] args) {

try {
     curam.util.impl.BatchLauncher.main(args);
    } catch (org.apache.tools.ant.ExitException e) {
     System.exit(e.getStatus());
  }
}

This class takes up to three arguments which are listed in order in the table in Invoking the Batch Launcher. If no arguments are passed, this class will run all batch programs enqueued in table BatchProcRequest.

The advantages of using the Batch Launcher rather than a handcrafted test harness to launch your program are: