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 2008/02/15 12:28:22 UTC

svn commit: r628020 - in /incubator/tuscany/java/sca/itest/jms/src: main/resources/dynamic/ main/resources/dynamic/client.composite test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java

Author: antelder
Date: Fri Feb 15 03:28:19 2008
New Revision: 628020

URL: http://svn.apache.org/viewvc?rev=628020&view=rev
Log:
Add itest for temporary response destinations

Added:
    incubator/tuscany/java/sca/itest/jms/src/main/resources/dynamic/
    incubator/tuscany/java/sca/itest/jms/src/main/resources/dynamic/client.composite
    incubator/tuscany/java/sca/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java   (with props)

Added: incubator/tuscany/java/sca/itest/jms/src/main/resources/dynamic/client.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/jms/src/main/resources/dynamic/client.composite?rev=628020&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/jms/src/main/resources/dynamic/client.composite (added)
+++ incubator/tuscany/java/sca/itest/jms/src/main/resources/dynamic/client.composite Fri Feb 15 03:28:19 2008
@@ -0,0 +1,38 @@
+<?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="RPCComposite">
+
+    <component name="HelloWorldClient">
+        <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldClientImpl"/>
+        <reference name="serviceA" />
+    </component>
+
+    <reference name="serviceA" promote="HelloWorldClient/serviceA">
+        <interface.java interface="org.apache.tuscany.sca.binding.jms.HelloWorldService" />
+        <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory" jndiURL="tcp://localhost:61619">
+            <destination name="DestQueueA"/>
+            <response>
+               <destination create="always"/>  <!-- create always with no name will create a temporary queue -->
+            </response>
+        </binding.jms>  
+    </reference>
+
+</composite>

Added: incubator/tuscany/java/sca/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java?rev=628020&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java Fri Feb 15 03:28:19 2008
@@ -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 org.apache.tuscany.sca.binding.jms;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class DynamicReplyQTestCase {
+
+    private static SCADomain scaDomain;
+
+    @Before
+    public void init() {
+        scaDomain =
+            SCADomain.newInstance("http://localhost", "/dynamic", "dynamic/client.composite", "simple/service.composite");
+    }
+
+    @Test
+    public void testHelloWorldCreate() throws Exception {
+        HelloWorldService helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldClient");
+        assertEquals("jmsHello Beate", helloWorldService.sayHello("Beate"));
+    }
+
+    @After
+    public void end() {
+        if (scaDomain != null) {
+            scaDomain.close();
+        }
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/jms/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.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