Author: lresende
Date: Tue Mar 25 01:18:04 2008
New Revision: 640737

URL: http://svn.apache.org/viewvc?rev=640737&view=rev
Log:
TUSCANY-1979 - Created sample application to follow same pattern of other 
samples

Added:
    incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/   
(with props)
    incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/README  
 (with props)
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/build.xml   
(with props)
    incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/pom.xml 
  (with props)
    incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorld.java
   (with props)
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldClient.java
   (with props)
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldImpl.java
   (with props)
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldImpl2.java
   (with props)
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/HelloWorldImpl2.componentType
   (with props)
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/helloworld.composite
   (with props)
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/test/
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/test/java/
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/test/java/helloworld/
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/test/java/helloworld/HelloWorldTestCase.java
   (with props)
    
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/test/resources/
Modified:
    incubator/tuscany/branches/sca-java-1.2/samples/README
    incubator/tuscany/branches/sca-java-1.2/samples/pom.xml

Modified: incubator/tuscany/branches/sca-java-1.2/samples/README
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/samples/README?rev=640737&r1=640736&r2=640737&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.2/samples/README (original)
+++ incubator/tuscany/branches/sca-java-1.2/samples/README Tue Mar 25 01:18:04 
2008
@@ -106,13 +106,15 @@
 
 implementation-crud-extension - Shows how to build new implementation type 
                                 extensions
-implementation-crud        - A sample application that exercises the new 
-                             implementation extensions
-binding-echo-extension     - Shows how to build new binding extensions
-binding-echo               - A sample application that exercises the new 
-                             binding extension
-implementation-notifiaction- Illustrates the use of 
<implementation.notification/>
+implementation-crud           - A sample application that exercises the new 
+                                implementation extensions
+binding-echo-extension        - Shows how to build new binding extensions
+binding-echo                  - A sample application that exercises the new 
+                                binding extension
+implementation-notifiaction   - Illustrates the use of 
<implementation.notification/>
 implementation-pojo-extension - shows how new implementation types are 
constructed 
+implementation-pojo           - A sample application that exercises the new 
+                                implementation type
 
 Sample Layout
 -------------

Propchange: incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Tue Mar 25 01:18:04 2008
@@ -0,0 +1,19 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+derby.log
+maven.log
+build.xml
+build-dependency.xml
+velocity.log*
+junit*.properties
+surefire*.properties
+.project
+.classpath
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders

Added: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/README
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/README?rev=640737&view=auto
==============================================================================
--- incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/README 
(added)
+++ incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/README 
Tue Mar 25 01:18:04 2008
@@ -0,0 +1,72 @@
+Implementation POJO Sample
+==========================
+This sample demonstrates how to use the new implementation type
+implementation-pojo. 
+
+The README in the samples directory (the directory above this) provides 
+general instructions about building and running samples. Take a look there 
+first. 
+
+Sample Overview
+---------------
+This sample contains a POJO implementation type as an example of how to create
+new implementation types.
+
+implementation-pojo-extension/
+  src/
+    main/
+      java/
+        helloworld/            - client application artifacts
+      resources/
+        helloworld.composite   - the SCA assembly used during unit testing
+
+    test/
+      java/
+        helloworld/
+          HelloWorldTestCase.java - JUnit test case
+
+  build.xml                    - the Ant build file
+  pom.xml                      - the Maven build file
+  
+Building And Running The Sample Using Ant
+-----------------------------------------
+With the binary distribution the sample extension can be built using Ant as 
+follows
+
+cd implementation-pojo
+ant compile
+ant run
+
+Building And Running The Sample Using Maven 
+-------------------------------------------
+With either the binary or source distributions the sample can be built 
+using Maven as follows. 
+
+cd implementation-pojo
+mvn
+
+Maven will also test that the sample extension built properly. You should see 
+the following output from the test phase.
+
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running helloworld.HelloWorldTestCase
+Initializing POJO
+Initializing POJO
+Executing POJO sayHello
+Destroying POJO
+Destroying POJO
+Initializing POJO
+Initializing POJO
+Executing POJO sayHello
+Destroying POJO
+Destroying POJO
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.463 sec
+
+Results :
+
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
+
+
+This shows that the Junit test cases have run successfully. 

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/README
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/README
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/build.xml
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/build.xml?rev=640737&view=auto
==============================================================================
--- 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/build.xml 
(added)
+++ 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/build.xml 
Tue Mar 25 01:18:04 2008
@@ -0,0 +1,51 @@
+<!--
+ * 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.    
+-->
+<project name="implementation-pojo-extension" default="compile">
+       <property name="test.jar"   
value="sample-implementation-pojo-extension.jar" />
+       
+    <target name="init">
+        <mkdir dir="target/classes"/>
+    </target>
+       
+    <target name="compile" depends="init">
+        <javac srcdir="src/main/java"
+               destdir="target/classes"
+               debug="on"
+               source="1.5"
+               target="1.5">
+            <classpath>
+               <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+            </classpath>
+        </javac> 
+        <copy todir="target/classes">
+            <fileset dir="src/main/resources"/>
+        </copy>
+        <jar destfile="target/${test.jar}" basedir="target/classes">
+            <manifest>
+                <attribute name="Main-Class" value="${test.class}" /> 
+            </manifest>
+        </jar>         
+    </target>  
+               
+    <target name="clean">
+        <delete quiet="true" includeemptydirs="true">
+            <fileset dir="target"/>
+        </delete>
+    </target>
+</project>

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/build.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/build.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/pom.xml?rev=640737&view=auto
==============================================================================
--- incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/pom.xml 
(added)
+++ incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/pom.xml 
Tue Mar 25 01:18:04 2008
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * 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.    
+-->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-sca</artifactId>
+        <version>1.2-incubating-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <artifactId>sample-implementation-pojo</artifactId>
+    <name>Apache Tuscany SCA POJO Implementation Extension Sample</name>
+
+    <repositories>
+       <repository>
+          <id>apache.incubator</id>
+          <url>http://people.apache.org/repo/m2-incubating-repository</url>
+       </repository>
+    </repositories>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>sample-implementation-pojo-extension</artifactId>
+            <version>1.2-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-assembly-xml</artifactId>
+            <version>1.2-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-interface-java-xml</artifactId>
+            <version>1.2-incubating-SNAPSHOT</version>
+        </dependency>        
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-core-spi</artifactId>
+            <version>1.2-incubating-SNAPSHOT</version>
+        </dependency>        
+               
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>1.2-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.2</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+       <finalName>${artifactId}</finalName>
+    </build>
+
+</project>

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorld.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorld.java?rev=640737&view=auto
==============================================================================
--- 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorld.java
 (added)
+++ 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorld.java
 Tue Mar 25 01:18:04 2008
@@ -0,0 +1,26 @@
+/*
+ * 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 helloworld;
+
+public interface HelloWorld {
+    
+    String sayHello(String name);
+
+}

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorld.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorld.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldClient.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldClient.java?rev=640737&view=auto
==============================================================================
--- 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldClient.java
 (added)
+++ 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldClient.java
 Tue Mar 25 01:18:04 2008
@@ -0,0 +1,37 @@
+/*
+ * 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 helloworld;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ * Tests the POJO implementation extension.
+ */
+public class HelloWorldClient {
+       
+       public static void main(String[] args) throws Exception {
+               SCADomain scaDomain = 
SCADomain.newInstance("helloworld/helloworld.composite");
+               HelloWorld helloworld = scaDomain.getService(HelloWorld.class, 
"HelloWorldComponent");
+               helloworld.sayHello("petra");
+               
+           HelloWorld helloworld2 = scaDomain.getService(HelloWorld.class, 
"HelloWorldComponent2/HelloWorld2");
+        helloworld2.sayHello("petra");
+    
+       }
+}

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldImpl.java?rev=640737&view=auto
==============================================================================
--- 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldImpl.java
 (added)
+++ 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldImpl.java
 Tue Mar 25 01:18:04 2008
@@ -0,0 +1,37 @@
+/*
+ * 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 helloworld;
+
+public class HelloWorldImpl {
+    
+    public void init() {
+        System.out.println("Initializing POJO");
+    }
+
+    public void destroy() {
+        System.out.println("Destroying POJO");
+    }
+
+    public String sayHello(String name) {
+        System.out.println("Executing POJO sayHello");
+        return "Hello " + name;
+    }
+
+}

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldImpl2.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldImpl2.java?rev=640737&view=auto
==============================================================================
--- 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldImpl2.java
 (added)
+++ 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldImpl2.java
 Tue Mar 25 01:18:04 2008
@@ -0,0 +1,37 @@
+/*
+ * 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 helloworld;
+
+public class HelloWorldImpl2 {
+    
+    public void init() {
+        System.out.println("Initializing POJO");
+    }
+
+    public void destroy() {
+        System.out.println("Destroying POJO");
+    }
+
+    public String sayHello(String name) {
+        System.out.println("Executing POJO sayHello");
+        return "Hello " + name;
+    }
+
+}

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldImpl2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/java/helloworld/HelloWorldImpl2.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/HelloWorldImpl2.componentType
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/HelloWorldImpl2.componentType?rev=640737&view=auto
==============================================================================
--- 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/HelloWorldImpl2.componentType
 (added)
+++ 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/HelloWorldImpl2.componentType
 Tue Mar 25 01:18:04 2008
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.    
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0";>
+
+    <service name="HelloWorld2">
+        <interface.java interface="helloworld.HelloWorld"/>
+    </service>
+
+</componentType>
\ No newline at end of file

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/HelloWorldImpl2.componentType
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/HelloWorldImpl2.componentType
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/HelloWorldImpl2.componentType
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/helloworld.composite
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/helloworld.composite?rev=640737&view=auto
==============================================================================
--- 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/helloworld.composite
 (added)
+++ 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/helloworld.composite
 Tue Mar 25 01:18:04 2008
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * 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.    
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
+       targetNamespace="http://test/helloworld";
+       xmlns:p="http://pojo";
+       name="helloworld">
+
+    <component name="HelloWorldComponent">
+        <p:implementation.pojo class="helloworld.HelloWorldImpl" />
+    </component>
+
+    <component name="HelloWorldComponent2">
+        <p:implementation.pojo class="helloworld.HelloWorldImpl2" />
+    </component>
+
+</composite>

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/helloworld.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/helloworld.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/main/resources/helloworld/helloworld.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/test/java/helloworld/HelloWorldTestCase.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/test/java/helloworld/HelloWorldTestCase.java?rev=640737&view=auto
==============================================================================
--- 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/test/java/helloworld/HelloWorldTestCase.java
 (added)
+++ 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/test/java/helloworld/HelloWorldTestCase.java
 Tue Mar 25 01:18:04 2008
@@ -0,0 +1,51 @@
+/*
+ * 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 helloworld;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ * Tests the POJO implementation extension.
+ */
+public class HelloWorldTestCase extends TestCase {
+    
+    private SCADomain scaDomain;
+    
+    @Override
+    protected void setUp() throws Exception {
+        scaDomain = SCADomain.newInstance("helloworld/helloworld.composite");
+    }
+    
+    @Override
+    protected void tearDown() throws Exception {
+        scaDomain.close();
+    }
+
+    public void testHello() throws Exception {
+        HelloWorld helloworld = scaDomain.getService(HelloWorld.class, 
"HelloWorldComponent");
+        assertEquals("Hello petra", helloworld.sayHello("petra"));
+    }
+
+    public void testHello2() throws Exception {
+        HelloWorld helloworld = scaDomain.getService(HelloWorld.class, 
"HelloWorldComponent2/HelloWorld2");
+        assertEquals("Hello petra", helloworld.sayHello("petra"));
+    }
+}

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/test/java/helloworld/HelloWorldTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/tuscany/branches/sca-java-1.2/samples/implementation-pojo/src/test/java/helloworld/HelloWorldTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/branches/sca-java-1.2/samples/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/samples/pom.xml?rev=640737&r1=640736&r2=640737&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.2/samples/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-1.2/samples/pom.xml Tue Mar 25 01:18:04 
2008
@@ -82,6 +82,7 @@
                 <module>implementation-crud</module>
                 <module>implementation-crud-extension</module>
                 <module>implementation-notification</module>
+                <module>implementation-pojo</module>
                 <module>implementation-pojo-extension</module>
                 <module>loanapplication</module>
                 <module>osgi-supplychain</module>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to