You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by lr...@apache.org on 2007/06/07 07:37:30 UTC
svn commit: r545069 - in /incubator/tuscany/sandbox/lresende/sca/samples: ./
consumer/ consumer/src/ consumer/src/main/ consumer/src/main/java/
consumer/src/main/java/client/ consumer/src/main/java/consumer/
consumer/src/main/resources/ consumer/src/ma...
Author: lresende
Date: Wed Jun 6 22:37:28 2007
New Revision: 545069
URL: http://svn.apache.org/viewvc?view=rev&rev=545069
Log:
Sample client application using two contributions
Added:
incubator/tuscany/sandbox/lresende/sca/samples/
incubator/tuscany/sandbox/lresende/sca/samples/consumer/
incubator/tuscany/sandbox/lresende/sca/samples/consumer/pom.xml
incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/
incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/
incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/
incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/client/
incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/client/ConsumerClient.java
incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/consumer/
incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/consumer/ConsumerService.java
incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/consumer/ConsumerServiceImpl.java
incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/resources/
incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/resources/Consumer.composite
incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/resources/META-INF/
incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/resources/META-INF/sca-contribution.xml
incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/test/
incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/test/java/
incubator/tuscany/sandbox/lresende/sca/samples/pom.xml
incubator/tuscany/sandbox/lresende/sca/samples/provider/
incubator/tuscany/sandbox/lresende/sca/samples/provider/pom.xml
incubator/tuscany/sandbox/lresende/sca/samples/provider/src/
incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/
incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/java/
incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/java/provider/
incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/java/provider/ProviderService.java
incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/java/provider/ProviderServiceImpl.java
incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/resources/
incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/resources/META-INF/
incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/resources/META-INF/sca-contribution.xml
incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/resources/Provider.composite
incubator/tuscany/sandbox/lresende/sca/samples/provider/src/test/
incubator/tuscany/sandbox/lresende/sca/samples/provider/src/test/java/
Added: incubator/tuscany/sandbox/lresende/sca/samples/consumer/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/lresende/sca/samples/consumer/pom.xml?view=auto&rev=545069
==============================================================================
--- incubator/tuscany/sandbox/lresende/sca/samples/consumer/pom.xml (added)
+++ incubator/tuscany/sandbox/lresende/sca/samples/consumer/pom.xml Wed Jun 6 22:37:28 2007
@@ -0,0 +1,76 @@
+<?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.0-incubating-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <artifactId>sample-consumer</artifactId>
+
+ <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-provider</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-embedded</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-contribution</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.2</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${artifactId}</finalName>
+ </build>
+
+</project>
Added: incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/client/ConsumerClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/client/ConsumerClient.java?view=auto&rev=545069
==============================================================================
--- incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/client/ConsumerClient.java (added)
+++ incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/client/ConsumerClient.java Wed Jun 6 22:37:28 2007
@@ -0,0 +1,71 @@
+/*
+ * 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 client;
+
+import java.net.URL;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.contribution.resolver.impl.ModelResolverImpl;
+import org.apache.tuscany.sca.contribution.service.ContributionService;
+import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
+
+import consumer.ConsumerService;
+
+public class ConsumerClient {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) throws Exception {
+ ClassLoader cl;
+ EmbeddedSCADomain domain;
+
+
+ //Create a test embedded SCA domain
+ cl = ConsumerClient.class.getClassLoader();
+ domain = new EmbeddedSCADomain(cl, "http://localhost");
+ //Start the domain
+ domain.start();
+
+ // Contribute the SCA contribution
+
+ ContributionService contributionService = domain.getContributionService();
+
+ ModelResolver providerResolver = new ModelResolverImpl(cl);
+ URL providerURL = new URL("file:/D:/dev/Opensource/Apache/Tuscany/source/sandbox/lresende/sca/samples/provider/target/sample-provider.jar");
+ Contribution providerContribution = contributionService.contribute("http://test/provider", providerURL, providerResolver, false);
+ Composite providerComposite = providerContribution.getDeployables().get(0);
+ domain.getDomainCompositeHelper().addComposite(providerComposite);
+
+ ModelResolver consumerResolver = new ModelResolverImpl(cl);
+ URL consumerURL = new URL("file:/D:/dev/Opensource/Apache/Tuscany/source/sandbox/lresende/sca/samples/consumer/target/classes/");
+ Contribution consumerContribution = contributionService.contribute("http://test/consumer", consumerURL, consumerResolver, false);
+ Composite consumerComposite = consumerContribution.getDeployables().get(0);
+ domain.getDomainCompositeHelper().addComposite(consumerComposite);
+
+
+ ConsumerService consumerService = domain.getService(ConsumerService.class, "ConsumerComponent");
+ consumerService.foo();
+
+
+ }
+
+}
Added: incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/consumer/ConsumerService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/consumer/ConsumerService.java?view=auto&rev=545069
==============================================================================
--- incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/consumer/ConsumerService.java (added)
+++ incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/consumer/ConsumerService.java Wed Jun 6 22:37:28 2007
@@ -0,0 +1,23 @@
+/*
+ * 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 consumer;
+
+public interface ConsumerService {
+ void foo();
+}
Added: incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/consumer/ConsumerServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/consumer/ConsumerServiceImpl.java?view=auto&rev=545069
==============================================================================
--- incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/consumer/ConsumerServiceImpl.java (added)
+++ incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/java/consumer/ConsumerServiceImpl.java Wed Jun 6 22:37:28 2007
@@ -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 consumer;
+
+import org.osoa.sca.annotations.Reference;
+
+import provider.ProviderService;
+
+public class ConsumerServiceImpl implements ConsumerService {
+ @Reference
+ protected ProviderService providerServiceRef;
+
+ public ConsumerServiceImpl(){
+
+ }
+
+ public void foo() {
+ System.out.println("delegating consumer.foo() to provider.foo()");
+ providerServiceRef.foo();
+ }
+}
Added: incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/resources/Consumer.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/resources/Consumer.composite?view=auto&rev=545069
==============================================================================
--- incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/resources/Consumer.composite (added)
+++ incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/resources/Consumer.composite Wed Jun 6 22:37:28 2007
@@ -0,0 +1,30 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="Consumer">
+
+ <component name="ConsumerComponent">
+ <implementation.java class="consumer.ConsumerServiceImpl"/>
+ <reference name="providerServiceRef" target="Provider/ProviderComponent"/>
+ </component>
+
+</composite>
Added: incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/resources/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/resources/META-INF/sca-contribution.xml?view=auto&rev=545069
==============================================================================
--- incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/resources/META-INF/sca-contribution.xml (added)
+++ incubator/tuscany/sandbox/lresende/sca/samples/consumer/src/main/resources/META-INF/sca-contribution.xml Wed Jun 6 22:37:28 2007
@@ -0,0 +1,25 @@
+<?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.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ >
+ <deployable composite="sample:Consumer"/>
+</contribution>
\ No newline at end of file
Added: incubator/tuscany/sandbox/lresende/sca/samples/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/lresende/sca/samples/pom.xml?view=auto&rev=545069
==============================================================================
--- incubator/tuscany/sandbox/lresende/sca/samples/pom.xml (added)
+++ incubator/tuscany/sandbox/lresende/sca/samples/pom.xml Wed Jun 6 22:37:28 2007
@@ -0,0 +1,46 @@
+<?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.0-incubating-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>tuscany-samples</artifactId>
+ <packaging>pom</packaging>
+ <name>Apache Tuscany SCA Samples</name>
+
+ <profiles>
+ <profile>
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <modules>
+ <module>provider</module>
+ <module>consumer</module>
+ </modules>
+ </profile>
+
+ </profiles>
+
+</project>
Added: incubator/tuscany/sandbox/lresende/sca/samples/provider/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/lresende/sca/samples/provider/pom.xml?view=auto&rev=545069
==============================================================================
--- incubator/tuscany/sandbox/lresende/sca/samples/provider/pom.xml (added)
+++ incubator/tuscany/sandbox/lresende/sca/samples/provider/pom.xml Wed Jun 6 22:37:28 2007
@@ -0,0 +1,64 @@
+<?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.0-incubating-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <artifactId>sample-provider</artifactId>
+
+ <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>tuscany-host-embedded</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>1.0-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.2</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${artifactId}</finalName>
+ </build>
+
+</project>
Added: incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/java/provider/ProviderService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/java/provider/ProviderService.java?view=auto&rev=545069
==============================================================================
--- incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/java/provider/ProviderService.java (added)
+++ incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/java/provider/ProviderService.java Wed Jun 6 22:37:28 2007
@@ -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 provider;
+
+public interface ProviderService {
+ void foo();
+}
Added: incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/java/provider/ProviderServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/java/provider/ProviderServiceImpl.java?view=auto&rev=545069
==============================================================================
--- incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/java/provider/ProviderServiceImpl.java (added)
+++ incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/java/provider/ProviderServiceImpl.java Wed Jun 6 22:37:28 2007
@@ -0,0 +1,30 @@
+/*
+ * 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 provider;
+
+public class ProviderServiceImpl implements ProviderService {
+ public ProviderServiceImpl(){
+
+ }
+
+ public void foo(){
+ System.out.println("executing provider.foo()");
+ }
+}
Added: incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/resources/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/resources/META-INF/sca-contribution.xml?view=auto&rev=545069
==============================================================================
--- incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/resources/META-INF/sca-contribution.xml (added)
+++ incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/resources/META-INF/sca-contribution.xml Wed Jun 6 22:37:28 2007
@@ -0,0 +1,25 @@
+<?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.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ >
+ <deployable composite="sample:Provider"/>
+</contribution>
\ No newline at end of file
Added: incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/resources/Provider.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/resources/Provider.composite?view=auto&rev=545069
==============================================================================
--- incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/resources/Provider.composite (added)
+++ incubator/tuscany/sandbox/lresende/sca/samples/provider/src/main/resources/Provider.composite Wed Jun 6 22:37:28 2007
@@ -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://sample"
+ xmlns:sample="http://sample"
+ name="Provider">
+
+ <service name="ProviderService" promote="ProviderComponent">
+ <interface.java interface="provider.ProviderService"/>
+ </service>
+
+ <component name="ProviderComponent">
+ <implementation.java class="provider.ProviderServiceImpl"/>
+ </component>
+
+</composite>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org