You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jm...@apache.org on 2006/09/09 07:07:30 UTC

svn commit: r441744 - in /incubator/tuscany/java/samples/sca/inner.composite: ./ src/ src/main/ src/main/java/ src/main/java/innercomposite/ src/main/resources/ src/main/resources/META-INF/ src/main/resources/META-INF/sca/ src/test/ src/test/java/ src/...

Author: jmarino
Date: Fri Sep  8 22:07:29 2006
New Revision: 441744

URL: http://svn.apache.org/viewvc?view=rev&rev=441744
Log:
[PATCH] commit samples patch by Ignacio for Tuscany-642

Added:
    incubator/tuscany/java/samples/sca/inner.composite/   (with props)
    incubator/tuscany/java/samples/sca/inner.composite/pom.xml   (with props)
    incubator/tuscany/java/samples/sca/inner.composite/src/
    incubator/tuscany/java/samples/sca/inner.composite/src/main/
    incubator/tuscany/java/samples/sca/inner.composite/src/main/java/
    incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/
    incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/InnerCompositeClient.java   (with props)
    incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/Source.java   (with props)
    incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/SourceCallback.java   (with props)
    incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/SourceImpl.java   (with props)
    incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/Target.java   (with props)
    incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/TargetImpl.java   (with props)
    incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/
    incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/
    incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/sca/
    incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/sca/InnerComposite.scdl
    incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/sca/InnerComposite2.scdl
    incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/sca/default.scdl
    incubator/tuscany/java/samples/sca/inner.composite/src/test/
    incubator/tuscany/java/samples/sca/inner.composite/src/test/java/
    incubator/tuscany/java/samples/sca/inner.composite/src/test/java/innercomposite/
    incubator/tuscany/java/samples/sca/inner.composite/src/test/java/innercomposite/InnerCompositeTestCase.java   (with props)

Propchange: incubator/tuscany/java/samples/sca/inner.composite/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Sep  8 22:07:29 2006
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Added: incubator/tuscany/java/samples/sca/inner.composite/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/inner.composite/pom.xml?view=auto&rev=441744
==============================================================================
--- incubator/tuscany/java/samples/sca/inner.composite/pom.xml (added)
+++ incubator/tuscany/java/samples/sca/inner.composite/pom.xml Fri Sep  8 22:07:29 2006
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *  Copyright (c) 2005-2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ -->
+<project>
+    <parent>
+        <groupId>org.apache.tuscany.samples.sca</groupId>
+        <artifactId>tuscany-samples-sca</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>sample-innercomposite</artifactId>
+    <packaging>jar</packaging>
+    <name>Tuscany Inner Composite Sample</name>
+    <description>A sample implementation showing local wiring of an inner composite.</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osoa</groupId>
+            <artifactId>sca-api-r0.95</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany</groupId>
+            <artifactId>test</artifactId>
+            <version>${sca.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>innercomposite.InnerCompositeClient</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: incubator/tuscany/java/samples/sca/inner.composite/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/inner.composite/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/InnerCompositeClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/InnerCompositeClient.java?view=auto&rev=441744
==============================================================================
--- incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/InnerCompositeClient.java (added)
+++ incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/InnerCompositeClient.java Fri Sep  8 22:07:29 2006
@@ -0,0 +1,20 @@
+package innercomposite;
+
+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 InnerCompositeClient {
+
+    public static void main(String[] args) {
+        CompositeContext context = CurrentCompositeContext.getContext();
+
+        Source source = context.locateService(Source.class, "SourceComponent");
+        System.out.println("Main thread " + Thread.currentThread());
+        source.clientMethod("Client.main");
+    }
+}

Propchange: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/InnerCompositeClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/InnerCompositeClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/Source.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/Source.java?view=auto&rev=441744
==============================================================================
--- incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/Source.java (added)
+++ incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/Source.java Fri Sep  8 22:07:29 2006
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package innercomposite;
+
+public interface Source {
+
+    void clientMethod(String arg);
+}

Propchange: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/Source.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/Source.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/SourceCallback.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/SourceCallback.java?view=auto&rev=441744
==============================================================================
--- incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/SourceCallback.java (added)
+++ incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/SourceCallback.java Fri Sep  8 22:07:29 2006
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package innercomposite;
+
+public interface SourceCallback {
+
+    void receiveResult(String result);
+}

Propchange: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/SourceCallback.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/SourceCallback.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/SourceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/SourceImpl.java?view=auto&rev=441744
==============================================================================
--- incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/SourceImpl.java (added)
+++ incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/SourceImpl.java Fri Sep  8 22:07:29 2006
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package innercomposite;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+@Service(Source.class)
+@Scope("MODULE")
+public class SourceImpl implements Source, SourceCallback {
+
+    private Target targetReference;
+    private Target targetReference2;
+    
+    @Reference
+    public void setTargetReference(Target target) {
+        this.targetReference = target;
+    }
+    
+    @Reference
+    public void setTargetReference2(Target target) {
+        this.targetReference2 = target;
+    }
+    
+    public void clientMethod(String arg) {
+        targetReference.someMethod(arg + " -> Source.clientMethod");
+        targetReference2.someMethod(arg + " => Source.clientMethod");
+    }
+    
+    public void receiveResult(String result) {
+        
+        System.out.println("Work thread " + Thread.currentThread());
+        System.out.println("Result: " + result);
+    }
+}

Propchange: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/SourceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/SourceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/Target.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/Target.java?view=auto&rev=441744
==============================================================================
--- incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/Target.java (added)
+++ incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/Target.java Fri Sep  8 22:07:29 2006
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package innercomposite;
+
+import org.osoa.sca.annotations.Callback;
+
+@Callback(SourceCallback.class)
+public interface Target {
+
+    void someMethod(String arg);
+}

Propchange: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/Target.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/Target.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/TargetImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/TargetImpl.java?view=auto&rev=441744
==============================================================================
--- incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/TargetImpl.java (added)
+++ incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/TargetImpl.java Fri Sep  8 22:07:29 2006
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package innercomposite;
+
+import org.osoa.sca.annotations.Callback;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+@Service(Target.class)
+@Scope("MODULE")
+public class TargetImpl implements Target {
+    
+    private SourceCallback sourceCallback;
+    
+    @Callback
+    public void setSourceCallback(SourceCallback sourceCallback) {
+        this.sourceCallback = sourceCallback;
+    }
+
+    public void someMethod(String arg) {
+        sourceCallback.receiveResult(arg + " -> Target.someMethod");
+    }
+}

Propchange: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/TargetImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/inner.composite/src/main/java/innercomposite/TargetImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/sca/InnerComposite.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/sca/InnerComposite.scdl?view=auto&rev=441744
==============================================================================
--- incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/sca/InnerComposite.scdl (added)
+++ incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/sca/InnerComposite.scdl Fri Sep  8 22:07:29 2006
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *  Copyright (c) 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+           name="InnerComposite">
+
+    <service name="InnerSourceService" target="InnerSourceComponent">
+        <interface.java interface="innercomposite.Source"/>
+        <reference name="innerSource">InnerSourceComponent</reference>
+    </service>
+       
+    <component name="InnerSourceComponent">
+		<implementation.java class="innercomposite.SourceImpl"/>
+        <reference name="targetReference">TargetComponentRef</reference>
+        <reference name="targetReference2">TargetComponentRef2</reference>
+    </component>
+	    
+    <reference name="TargetComponentRef">
+        <interface.java interface="innercomposite.Target"
+                        callbackInterface="innercomposite.SourceCallback"/>
+    </reference>
+    
+    <reference name="TargetComponentRef2">
+        <interface.java interface="innercomposite.Target"
+                        callbackInterface="innercomposite.SourceCallback"/>
+    </reference>
+    
+</composite>

Added: incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/sca/InnerComposite2.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/sca/InnerComposite2.scdl?view=auto&rev=441744
==============================================================================
--- incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/sca/InnerComposite2.scdl (added)
+++ incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/sca/InnerComposite2.scdl Fri Sep  8 22:07:29 2006
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *  Copyright (c) 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+           name="InnerComposite2">
+
+    <service name="InnerTargetService" target="InnerTargetComponent">
+        <interface.java interface="innercomposite.Target"
+                        callbackInterface="innercomposite.SourceCallback"/>
+        <reference name="innerSource">InnerTargetComponent</reference>
+    </service>
+       
+    <component name="InnerTargetComponent">
+		<implementation.java class="innercomposite.TargetImpl"/>
+    </component>
+    
+</composite>

Added: incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/sca/default.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/sca/default.scdl?view=auto&rev=441744
==============================================================================
--- incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/sca/default.scdl (added)
+++ incubator/tuscany/java/samples/sca/inner.composite/src/main/resources/META-INF/sca/default.scdl Fri Sep  8 22:07:29 2006
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *  Copyright (c) 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+           name="OuterComposite">
+           
+    <component name="SourceComponent">
+        <implementation.composite name="InnerComposite" scdlLocation="InnerComposite.scdl"/>
+        <reference name="TargetComponentRef">TargetComponent</reference>
+        <reference name="TargetComponentRef2">TargetComponent2</reference>
+    </component>
+
+    <component name="TargetComponent">
+		<implementation.java class="innercomposite.TargetImpl"/>
+    </component>
+    
+    <component name="TargetComponent2">
+        <implementation.composite name="InnerComposite2" scdlLocation="InnerComposite2.scdl"/>
+    </component>
+
+</composite>

Added: incubator/tuscany/java/samples/sca/inner.composite/src/test/java/innercomposite/InnerCompositeTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/inner.composite/src/test/java/innercomposite/InnerCompositeTestCase.java?view=auto&rev=441744
==============================================================================
--- incubator/tuscany/java/samples/sca/inner.composite/src/test/java/innercomposite/InnerCompositeTestCase.java (added)
+++ incubator/tuscany/java/samples/sca/inner.composite/src/test/java/innercomposite/InnerCompositeTestCase.java Fri Sep  8 22:07:29 2006
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package innercomposite;
+
+import org.apache.tuscany.test.SCATestCase;
+import org.osoa.sca.CompositeContext;
+import org.osoa.sca.CurrentCompositeContext;
+
+public class InnerCompositeTestCase extends SCATestCase {
+    
+    private Source source;
+
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        CompositeContext context = CurrentCompositeContext.getContext();
+        source = context.locateService(Source.class, "SourceComponent");
+}
+    
+    public void test() throws Exception {
+        
+        System.out.println("Main thread " + Thread.currentThread());
+        source.clientMethod("Client.main");
+        System.out.println("Sleeping ...");
+        Thread.sleep(1000);
+    }
+}

Propchange: incubator/tuscany/java/samples/sca/inner.composite/src/test/java/innercomposite/InnerCompositeTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/inner.composite/src/test/java/innercomposite/InnerCompositeTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org