You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2009/12/09 12:06:48 UTC
svn commit: r888769 - in
/tuscany/sca-java-2.x/trunk/distribution/tomcat/testing: ./
helloworld-reference-contribution/ helloworld-reference-contribution/src/
helloworld-reference-contribution/src/main/
helloworld-reference-contribution/src/main/java/ ...
Author: antelder
Date: Wed Dec 9 11:06:48 2009
New Revision: 888769
URL: http://svn.apache.org/viewvc?rev=888769&view=rev
Log:
Add a contribution that has a reference using the helloworld-service-contribution component
Added:
tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/ (with props)
tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/pom.xml
tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/
tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/
tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/java/
tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/java/testing/
tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/java/testing/HelloworldRefImpl.java
tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/java/testing/HelloworldService.java
tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/resources/
tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/resources/META-INF/
tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/resources/META-INF/sca-contribution.xml
tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/resources/helloworld.composite
Modified:
tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/pom.xml
Propchange: tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Dec 9 11:06:48 2009
@@ -0,0 +1,20 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+derby.log
+maven.log
+maven-eclipse.xml
+build.xml
+build-dependency.xml
+velocity.log*
+junit*.properties
+surefire*.properties
+.project
+.classpath
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders
Added: tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/pom.xml?rev=888769&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/pom.xml (added)
+++ tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/pom.xml Wed Dec 9 11:06:48 2009
@@ -0,0 +1,45 @@
+<?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-distribution-tomcat-testing</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>helloworld-reference-contribution</artifactId>
+ <name>Apache Tuscany SCA Tomcat Integration Testing Helloworld Reference Contribution</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${artifactId}</finalName>
+ </build>
+</project>
Added: tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/java/testing/HelloworldRefImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/java/testing/HelloworldRefImpl.java?rev=888769&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/java/testing/HelloworldRefImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/java/testing/HelloworldRefImpl.java Wed Dec 9 11:06:48 2009
@@ -0,0 +1,38 @@
+/*
+ * 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 testing;
+
+import org.oasisopen.sca.annotation.Service;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.EagerInit;
+
+@Service(HelloworldService.class)
+public class HelloworldRefImpl implements HelloworldService {
+
+ @Reference
+ public HelloworldService service;
+
+ public String sayHello(String name) {
+ if (service == null) {
+ return "ERROR, @Reference is null!";
+ } else {
+ return "Hello ref says: " + service.sayHello(name);
+ }
+ }
+}
Added: tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/java/testing/HelloworldService.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/java/testing/HelloworldService.java?rev=888769&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/java/testing/HelloworldService.java (added)
+++ tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/java/testing/HelloworldService.java Wed Dec 9 11:06:48 2009
@@ -0,0 +1,28 @@
+/*
+ * 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 testing;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloworldService {
+
+ String sayHello(String name);
+
+}
Added: tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/resources/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/resources/META-INF/sca-contribution.xml?rev=888769&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/resources/META-INF/sca-contribution.xml (added)
+++ tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/resources/META-INF/sca-contribution.xml Wed Dec 9 11:06:48 2009
@@ -0,0 +1,23 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:testing="http://org.apache.tuscany.tomcat.testing">
+ <deployable composite="testing:helloworld-reference-contribution"/>
+</contribution>
\ No newline at end of file
Added: tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/resources/helloworld.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/resources/helloworld.composite?rev=888769&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/resources/helloworld.composite (added)
+++ tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/helloworld-reference-contribution/src/main/resources/helloworld.composite Wed Dec 9 11:06:48 2009
@@ -0,0 +1,29 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://org.apache.tuscany.tomcat.testing"
+ name="helloworld-reference-contribution">
+
+ <component name="HelloworldRefComponent">
+ <implementation.java class="testing.HelloworldRefImpl"/>
+ <reference name="service" target="HelloworldComponent" />
+ </component>
+
+</composite>
Modified: tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/pom.xml?rev=888769&r1=888768&r2=888769&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/pom.xml (original)
+++ tuscany/sca-java-2.x/trunk/distribution/tomcat/testing/pom.xml Wed Dec 9 11:06:48 2009
@@ -32,6 +32,7 @@
<modules>
<module>helloworld-service-contribution</module>
+ <module>helloworld-reference-contribution</module>
<module>helloworld-scaclient-webapp</module>
<module>helloworld-client-webapp</module>
<module>legal-checks</module>