diff options
Diffstat (limited to 'branches/sca-java-integration/samples/sca/composite-impl/src/main/java/composite/CompositeClient.java')
-rw-r--r-- | branches/sca-java-integration/samples/sca/composite-impl/src/main/java/composite/CompositeClient.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/branches/sca-java-integration/samples/sca/composite-impl/src/main/java/composite/CompositeClient.java b/branches/sca-java-integration/samples/sca/composite-impl/src/main/java/composite/CompositeClient.java new file mode 100644 index 0000000000..7543b68a29 --- /dev/null +++ b/branches/sca-java-integration/samples/sca/composite-impl/src/main/java/composite/CompositeClient.java @@ -0,0 +1,26 @@ +package composite; + +import org.apache.tuscany.api.SCARuntime; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; + +/** + * Simple client program that invokes the components that we wired together. + * + * @version $Rev$ $Date$ + */ +public class CompositeClient { + + public static void main(String[] args) throws Exception { + SCARuntime.start("OuterComposite.composite"); + + CompositeContext context = CurrentCompositeContext.getContext(); + + Source source = context.locateService(Source.class, "SourceComponent/InnerSourceService"); + System.out.println("Main thread " + Thread.currentThread()); + source.clientMethod("Client.main"); + Thread.sleep(500); + + SCARuntime.stop(); + } +} |