Jump to: navigation, search

Difference between revisions of "SCA/SCA Component/SCA Java Run and Debug Other"

< SCA
(New page: == Introduction == This tutorial explains how you can run an SCA Java project created with SCA Tools on your own runtime.<br /> There are four simple steps to perform: * Create your launc...)
 
 
(One intermediate revision by one other user not shown)
Line 26: Line 26:
  
  
As an example, the <code>org.eclipse.stp.sca.deployment</code> plug-in provides two main classes to deploy a composite on [[STP/SCA_Component/SCA_Java_Run_and_Debug_Tuscany#Appendix_ the_main_method_for_Tuscany|Apache Tuscany]] and [[SCA_Java_Run_and_Debug_FraSCAti#Appendix:_the_main_method_for_FraSCAti|OW2 FraSCAti]]. These classes use the Java reflect API because we don't want any dependency between the plug-in and the runtime platform. If you want your launcher to be part of SCA Tools, you can contribute it in the [https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=STP&product=SCA STP bugzilla]. Just make sure to avoid code dependencies between the launcher and your platform (use Java reflect if necessary). In any case, this launcher does not have to be a plug-in. A single class or a simple Java project is enough.
+
As an example, the <code>org.eclipse.stp.sca.deployment</code> plug-in provides two main classes to deploy a composite on [[STP/SCA_Component/SCA_Java_Run_and_Debug_Tuscany#Appendix:_the_main_method_for_Tuscany|Apache Tuscany]] and [[STP/SCA_Component/SCA_Java_Run_and_Debug_FraSCAti#Appendix:_the_main_method_for_FraSCAti|OW2 FraSCAti]]. These classes use the Java reflect API because we don't want any dependency between the plug-in and the runtime platform. If you want your launcher to be part of SCA Tools, you can contribute it in the [https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=STP&product=SCA STP bugzilla]. Just make sure to avoid code dependencies between the launcher and your platform (use Java reflect if necessary). In any case, this launcher does not have to be a plug-in. A single class or a simple Java project is enough.
  
  
Line 45: Line 45:
 
Save the preferences by clicking '''Apply''' or '''OK'''. That's it.<br />
 
Save the preferences by clicking '''Apply''' or '''OK'''. That's it.<br />
 
You then just have to ''run the composite as'' an instance of your master launch configuration.
 
You then just have to ''run the composite as'' an instance of your master launch configuration.
 +
 +
 +
[[Category:SOA_Tools]]
 +
[[Category:SOA]]
 +
[[Category:STP]]
 +
[[Category:SCA]]

Latest revision as of 04:35, 9 November 2010

Introduction

This tutorial explains how you can run an SCA Java project created with SCA Tools on your own runtime.
There are four simple steps to perform:

  • Create your launcher application.
  • Create a master launch configuration for your runtime.
  • Instantiate this configuration for the composite to deploy.
  • Optionaly, modify the generated configuration (for advanced use).


For the following, we assume you have taken a look at these links:


The two last steps are similar to what was done for Tuscany and FraSCAti.
We will only detail the two first steps.


Write your own launcher

This step is quite simple to describe.
Simply write a Java program and package it into a jar file.
This program will be in charge of deploying (or performing an action) on a composite file. It will be called by Eclipse when a user selects the "Run as..." action on a composite with your runtime.


As an example, the org.eclipse.stp.sca.deployment plug-in provides two main classes to deploy a composite on Apache Tuscany and OW2 FraSCAti. These classes use the Java reflect API because we don't want any dependency between the plug-in and the runtime platform. If you want your launcher to be part of SCA Tools, you can contribute it in the STP bugzilla. Just make sure to avoid code dependencies between the launcher and your platform (use Java reflect if necessary). In any case, this launcher does not have to be a plug-in. A single class or a simple Java project is enough.


Create a master launch configuration for your runtime

Go into Window > Preferences > SCA Tools > Run / Debug.
Click Add.... In the dialog that shows up, type in a name of your master launch configuration.


SCA Java Run and Debug Other1.gif


In the Classpath tab, add the libraries of your runtime and add the library for your launcher.
In the Launch tab, specify the name of the launcher class.
Make sure the arguments are valid according to what the main class expects.


Save the preferences by clicking Apply or OK. That's it.
You then just have to run the composite as an instance of your master launch configuration.