Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

After completing these steps the content of the "store" project will look as follows.


 

Launch Services

In this step you create the code to launch the Tuscany runtime with the new store composite service you created.

Select the "store" project and click on the New Java Package button Image Added in the toolbar to start the package creation dialog. Use the dialog to create a new package named "launch".

Select the "launch" package. Select the New Java Class button  Image Added . In the dialog enter "Launch" as the Name of the class, check the checkbox for creating a main method stub, and then select Finish to complete the dialog.

The Java editor will open on the new created Java class. Replace the content of the editor by copy-paste of the following Java class code snippet.

Code Block


package launch;

import org.apache.tuscany.sca.host.embedded.SCADomain;

public class Launch {
    public static void main(String[] args) throws Exception {
        System.out.println("Starting ...");
        SCADomain scaDomain = SCADomain.newInstance("store.composite");
        System.out.println("store.composite ready for big business !!!");
        System.in.read();
        System.out.println("Stopping ...");
        scaDomain.close();
        System.out.println();
    }
}

Congratulations you completed your 1st composite service applications, now its time to take it into
action.

...