Running and debugging SCA Java projects

Objectives

Generally, to deploy an SCA Java project on a platform (e.g. Apache Tuscany), there are two steps to follow:

  1. The libraries of this platform must be added to the classpath of the project.
  2. A main application must be written to deploy a composite on this runtime.

The disadvantages of this method is the SCA project is coupled to a precise runtime through these dependencies. Therefore, the project classpath must be modified to test the deployment on another version of this runtime, or another runtime.

To avoid all of this, SCA Tools introduced run and debug configurations.

Running and debugging SCA Java projects

To run (or debug) an SCA Java project, you must:


Right-click on a composite and select SCA > Run as...

What is done when you « run an SCA composite as » depends on the master launch configuration you used (more precisely, its main class). In general, this main class will simply deploy the SCA application on the platform. You may then run a client application to perform advanced testing or debugging on your application.

Master and concrete launch configurations

SCA Tools introduced two levels of run configurations:

Master launch configurations

Master launch configurations are defined in the preferences.
You can add or modify one by selecting Window > Preferences and then opening the Run / Debug page in the SCA Tools category. A master launch configuration expects some elements to be specified:

Concrete launch configurations

A concrete launch configuration is a copy of a master launch configuration, completed with information retrieved from the launching context (e.g. SCA java project added to the class path, program arguments replaced by contextual values).

Concrete launch configurations are visible by selecting Run > Run configurations... or Run > Debug configurations... and then by checking the SCA Application category.