tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r497823 - in /incubator/tuscany/java/samples/sca: helloworld.jmsReference/ helloworld.jmsReference/src/ helloworld.jmsReference/src/main/ helloworld.jmsReference/src/main/java/ helloworld.jmsReference/src/main/java/helloworld/ helloworld.jm...
Date Fri, 19 Jan 2007 14:16:22 GMT
Author: antelder
Date: Fri Jan 19 06:16:20 2007
New Revision: 497823

URL: http://svn.apache.org/viewvc?view=rev&rev=497823
Log:
Add JMS sample contributed by Lee Zhenghui

Added:
    incubator/tuscany/java/samples/sca/helloworld.jmsReference/   (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsReference/pom.xml   (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/   (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/   (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/   (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/ 
 (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/HelloWorldImpl.java
  (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/HelloWorldService.java
  (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/resources/   (with
props)
    incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/resources/META-INF/
  (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/resources/META-INF/sca/
  (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/resources/META-INF/sca/default.scdl
  (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/test/   (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/test/java/   (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/test/java/helloworld/ 
 (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/test/java/helloworld/HelloWorldJmsClient.java
  (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsService/
    incubator/tuscany/java/samples/sca/helloworld.jmsService/pom.xml   (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsService/src/
    incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/
    incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/java/
    incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/java/helloworld/
    incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/java/helloworld/HelloWorldImpl.java
  (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/java/helloworld/HelloWorldService.java
  (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/resources/
    incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/resources/META-INF/
    incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/resources/META-INF/sca/
    incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/resources/META-INF/sca/default.scdl
  (with props)
    incubator/tuscany/java/samples/sca/helloworld.jmsService/src/test/
    incubator/tuscany/java/samples/sca/helloworld.jmsService/src/test/java/
    incubator/tuscany/java/samples/sca/helloworld.jmsService/src/test/java/helloworld/
    incubator/tuscany/java/samples/sca/helloworld.jmsService/src/test/java/helloworld/HelloWorldJmsServer.java
  (with props)

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Fri Jan 19 06:16:20 2007
@@ -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/helloworld.jmsReference/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworld.jmsReference/pom.xml?view=auto&rev=497823
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworld.jmsReference/pom.xml (added)
+++ incubator/tuscany/java/samples/sca/helloworld.jmsReference/pom.xml Fri Jan 19 06:16:20
2007
@@ -0,0 +1,77 @@
+<?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>
+    <parent>
+        <groupId>org.apache.tuscany.samples.sca</groupId>
+        <artifactId>parent</artifactId>
+        <version>1.0-incubator-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>sample-helloworld-jmsReference</artifactId>
+    <packaging>jar</packaging>
+    <name>Tuscany JMS Reference Helloworld Sample</name>
+    <description>A helloworld sample using a JMS Reference</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osoa</groupId>
+            <artifactId>sca-api-r0.95</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>test</artifactId>
+            <version>${tuscanyVersion}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca.services.bindings</groupId>
+            <artifactId>jms</artifactId>
+            <version>${tuscanyVersion}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>activemq</groupId>
+            <artifactId>activemq-core</artifactId>
+            <version>3.2</version>
+            <scope>test</scope>
+        </dependency>       
+        <dependency>
+            <groupId>geronimo-spec</groupId>
+            <artifactId>geronimo-spec-j2ee-management</artifactId>
+            <version>1.0-rc4</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>helloworld.HelloWorldJmsClient</mainClass>

+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

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

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/pom.xml
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Fri Jan 19 06:16:20 2007
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

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

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Fri Jan 19 06:16:20 2007
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Fri Jan 19 06:16:20 2007
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Fri Jan 19 06:16:20 2007
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Fri Jan 19 06:16:20 2007
@@ -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/helloworld.jmsReference/src/main/java/helloworld/HelloWorldImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/HelloWorldImpl.java?view=auto&rev=497823
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/HelloWorldImpl.java
(added)
+++ incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/HelloWorldImpl.java
Fri Jan 19 06:16:20 2007
@@ -0,0 +1,47 @@
+/*
+ * 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.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldImpl implements HelloWorldService 
+{
+    @Reference
+    private HelloWorldService extService = null;
+    
+    public HelloWorldService getExtService() {
+        return extService;
+    }
+
+    @Reference
+    public void setExtService(HelloWorldService extService) {
+        this.extService = extService;
+    }
+
+    public String sayHello(String name)  
+    {
+        return extService.sayHello(name);
+    }
+
+}

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/HelloWorldImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/HelloWorldImpl.java
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Fri Jan 19 06:16:20 2007
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/HelloWorldImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/HelloWorldService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/HelloWorldService.java?view=auto&rev=497823
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/HelloWorldService.java
(added)
+++ incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/HelloWorldService.java
Fri Jan 19 06:16:20 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 helloworld;
+
+
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+public interface HelloWorldService  {
+
+    public String sayHello(String name) ;
+
+}

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/HelloWorldService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/HelloWorldService.java
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Fri Jan 19 06:16:20 2007
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/java/helloworld/HelloWorldService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/resources/
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Fri Jan 19 06:16:20 2007
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/resources/META-INF/
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Fri Jan 19 06:16:20 2007
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/resources/META-INF/sca/
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Fri Jan 19 06:16:20 2007
@@ -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/helloworld.jmsReference/src/main/resources/META-INF/sca/default.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/resources/META-INF/sca/default.scdl?view=auto&rev=497823
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/resources/META-INF/sca/default.scdl
(added)
+++ incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/resources/META-INF/sca/default.scdl
Fri Jan 19 06:16:20 2007
@@ -0,0 +1,36 @@
+<?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"
+           name="HelloWorldJmsClientComposite">
+           
+    <component name="HelloWorldServiceComponent">
+        <implementation.java class="helloworld.HelloWorldImpl"/>
+       <reference name="extService">HelloWorldJmsService</reference>
+    </component>
+    
+    <reference name="HelloWorldJmsService">
+        <interface.java interface="helloworld.HelloWorldService"/>
+         <binding.jms initialContextFactory="org.activemq.jndi.ActiveMQInitialContextFactory"
JNDIProviderURL="tcp://localhost:61616" >
+           <destination name="dynamicQueues/HelloWorldServiceQueue" />
+           <connectionFactory name="ConnectionFactory" />
+        </binding.jms>
+    </reference>
+   
+</composite>

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/resources/META-INF/sca/default.scdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/resources/META-INF/sca/default.scdl
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Fri Jan 19 06:16:20 2007
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/resources/META-INF/sca/default.scdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/main/resources/META-INF/sca/default.scdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/test/
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Fri Jan 19 06:16:20 2007
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/test/java/
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Fri Jan 19 06:16:20 2007
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/test/java/helloworld/
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Fri Jan 19 06:16:20 2007
@@ -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/helloworld.jmsReference/src/test/java/helloworld/HelloWorldJmsClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/test/java/helloworld/HelloWorldJmsClient.java?view=auto&rev=497823
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/test/java/helloworld/HelloWorldJmsClient.java
(added)
+++ incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/test/java/helloworld/HelloWorldJmsClient.java
Fri Jan 19 06:16:20 2007
@@ -0,0 +1,53 @@
+/*
+ * 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.test.SCATestCase;
+import org.osoa.sca.CompositeContext;
+import org.osoa.sca.CurrentCompositeContext;
+
+/**
+ * @author administrator
+ *
+ */ 
+public class HelloWorldJmsClient extends SCATestCase{ 
+    private HelloWorldService helloWorldService;
+    protected void setUp() throws Exception {
+        setApplicationSCDL(HelloWorldService.class, "META-INF/sca/default.scdl");
+        addExtension("jms.binding", getClass().getClassLoader().getResource("META-INF/sca/jms.system.scdl"));
+        addExtension("idl.wsdl", getClass().getClassLoader().getResource("META-INF/sca/idl.wsdl.scdl"));
+        addExtension("databinding.axiom", getClass().getResource("/META-INF/sca/databinding.axiom.scdl"));
+        super.setUp();
+        CompositeContext context = CurrentCompositeContext.getContext();
+        helloWorldService = context.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
+    }
+    public void testHelloWorld(){
+       assertEquals("Hello World", helloWorldService.sayHello("World"));
+    }
+    public static void main(String[] args) {
+        try {
+            HelloWorldJmsClient helloWorldJmsServer = new HelloWorldJmsClient();
+            helloWorldJmsServer.setUp();
+            helloWorldJmsServer.testHelloWorld();
+        } catch ( Exception e ) {
+            e.printStackTrace();
+        }
+    }
+
+}

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/test/java/helloworld/HelloWorldJmsClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/test/java/helloworld/HelloWorldJmsClient.java
------------------------------------------------------------------------------
--- svn:ignores (added)
+++ svn:ignores Fri Jan 19 06:16:20 2007
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsReference/src/test/java/helloworld/HelloWorldJmsClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/samples/sca/helloworld.jmsService/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworld.jmsService/pom.xml?view=auto&rev=497823
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworld.jmsService/pom.xml (added)
+++ incubator/tuscany/java/samples/sca/helloworld.jmsService/pom.xml Fri Jan 19 06:16:20 2007
@@ -0,0 +1,78 @@
+<?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>
+    <parent>
+        <groupId>org.apache.tuscany.samples.sca</groupId>
+        <artifactId>parent</artifactId>
+        <version>1.0-incubator-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>sample-helloworld-jmsService</artifactId>
+    <packaging>jar</packaging>
+    <name>Tuscany JMS Service Helloworld Sample</name>
+    <description>A helloworld sample hosting JMS Service</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osoa</groupId>
+            <artifactId>sca-api-r0.95</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>test</artifactId>
+            <version>${tuscanyVersion}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca.services.bindings</groupId>
+            <artifactId>jms</artifactId>
+            <version>${tuscanyVersion}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>activemq</groupId>
+            <artifactId>activemq-core</artifactId>
+            <version>3.2</version>
+            <scope>test</scope>
+        </dependency>       
+        <dependency>
+            <groupId>geronimo-spec</groupId>
+            <artifactId>geronimo-spec-j2ee-management</artifactId>
+            <version>1.0-rc4</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>helloworld.HelloWorldJmsServer</mainClass>

+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    
+</project>

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

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

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsService/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/java/helloworld/HelloWorldImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/java/helloworld/HelloWorldImpl.java?view=auto&rev=497823
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/java/helloworld/HelloWorldImpl.java
(added)
+++ incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/java/helloworld/HelloWorldImpl.java
Fri Jan 19 06:16:20 2007
@@ -0,0 +1,35 @@
+/*
+ * 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.osoa.sca.annotations.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldImpl implements HelloWorldService 
+{
+
+    public String sayHello(String name)  
+    {
+        System.out.println("[HelloWorld from JMSBinding] " + "Hello " + name);
+        return "Hello " + name;
+    }
+}

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/java/helloworld/HelloWorldImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/java/helloworld/HelloWorldImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/java/helloworld/HelloWorldService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/java/helloworld/HelloWorldService.java?view=auto&rev=497823
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/java/helloworld/HelloWorldService.java
(added)
+++ incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/java/helloworld/HelloWorldService.java
Fri Jan 19 06:16:20 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 helloworld;
+
+
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+public interface HelloWorldService {
+
+    public String sayHello(String name);
+
+}

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/java/helloworld/HelloWorldService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/java/helloworld/HelloWorldService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/resources/META-INF/sca/default.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/resources/META-INF/sca/default.scdl?view=auto&rev=497823
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/resources/META-INF/sca/default.scdl
(added)
+++ incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/resources/META-INF/sca/default.scdl
Fri Jan 19 06:16:20 2007
@@ -0,0 +1,36 @@
+<?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"
+           name="HelloWorldJmsServiceComposite">
+           
+    <service name="HelloWorldJmsService">
+        <interface.java interface="helloworld.HelloWorldService"/>
+        <binding.jms initialContextFactory="org.activemq.jndi.ActiveMQInitialContextFactory"
JNDIProviderURL="tcp://localhost:61616" >
+           <destination name="HelloWorldServiceQueue" />
+           <connectionFactory name="ConnectionFactory" />
+        </binding.jms>
+        <reference>HelloWorldServiceComponent</reference>
+    </service>           
+      
+    <component name="HelloWorldServiceComponent">
+        <implementation.java class="helloworld.HelloWorldImpl"/>
+    </component>
+   
+</composite>

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/resources/META-INF/sca/default.scdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/resources/META-INF/sca/default.scdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsService/src/main/resources/META-INF/sca/default.scdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/samples/sca/helloworld.jmsService/src/test/java/helloworld/HelloWorldJmsServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworld.jmsService/src/test/java/helloworld/HelloWorldJmsServer.java?view=auto&rev=497823
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworld.jmsService/src/test/java/helloworld/HelloWorldJmsServer.java
(added)
+++ incubator/tuscany/java/samples/sca/helloworld.jmsService/src/test/java/helloworld/HelloWorldJmsServer.java
Fri Jan 19 06:16:20 2007
@@ -0,0 +1,75 @@
+/*
+ * 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.activemq.broker.BrokerContainer;
+import org.activemq.broker.impl.BrokerContainerImpl;
+import org.activemq.store.vm.VMPersistenceAdapter;
+import org.apache.tuscany.test.SCATestCase;
+import org.osoa.sca.CurrentCompositeContext;
+
+
+/**
+ * @author administrator
+ */
+public class HelloWorldJmsServer extends SCATestCase{
+    private BrokerContainer broker;
+    
+    public HelloWorldJmsServer() {
+        if (broker == null)
+            broker = new  BrokerContainerImpl("JMS BindingDefinition Test");
+    }
+    
+    private void startBroker() throws Exception {
+        // configure the broker
+        broker.addConnector("tcp://localhost:61616");
+        broker.setPersistenceAdapter(new VMPersistenceAdapter());
+        broker.start();
+    }
+    
+    protected void setUp() throws Exception {
+        startBroker();
+        setApplicationSCDL(HelloWorldService.class, "META-INF/sca/default.scdl");
+        addExtension("jms.binding", getClass().getClassLoader().getResource("META-INF/sca/jms.system.scdl"));
+        addExtension("idl.wsdl", getClass().getClassLoader().getResource("META-INF/sca/idl.wsdl.scdl"));
+        addExtension("databinding.axiom", getClass().getResource("/META-INF/sca/databinding.axiom.scdl"));
+        super.setUp();
+        CurrentCompositeContext.getContext();
+    }
+    public void testJMSServer(){
+        try {
+            System.out.println("Service Started and Running...");
+            System.out.println("Hit ENTER to exit");
+            System.in.read();
+            System.out.println("Server Stopped!");
+            System.exit(0);
+        } catch ( Exception e ) {
+            e.printStackTrace();
+        }
+    }
+    public static void main(String[] args) {
+        try {
+            HelloWorldJmsServer helloWorldJmsServer = new HelloWorldJmsServer();
+            helloWorldJmsServer.setUp();
+            helloWorldJmsServer.testJMSServer();
+        } catch ( Exception e ) {
+            e.printStackTrace();
+        }
+    }
+}

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsService/src/test/java/helloworld/HelloWorldJmsServer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/helloworld.jmsService/src/test/java/helloworld/HelloWorldJmsServer.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


Mime
View raw message