You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2008/03/27 13:23:44 UTC

svn commit: r641792 - in /activemq/camel/trunk: ./ components/camel-jms/ components/camel-jms/src/test/java/org/apache/camel/component/jms/remoting/ components/camel-jms/src/test/resources/org/apache/camel/component/jms/remoting/ components/camel-spring/

Author: jstrachan
Date: Thu Mar 27 05:23:41 2008
New Revision: 641792

URL: http://svn.apache.org/viewvc?rev=641792&view=rev
Log:
added a simpler spring remoting test case that is a bit easier to understand (and avoids deriving from another test case)

Added:
    activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/remoting/RemotingTest.java   (with props)
    activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/remoting/RemotingTest-context.xml
      - copied, changed from r641728, activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/remoting/spring.xml
Modified:
    activemq/camel/trunk/components/camel-jms/pom.xml
    activemq/camel/trunk/components/camel-spring/pom.xml
    activemq/camel/trunk/pom.xml

Modified: activemq/camel/trunk/components/camel-jms/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/pom.xml?rev=641792&r1=641791&r2=641792&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/pom.xml (original)
+++ activemq/camel/trunk/components/camel-jms/pom.xml Thu Mar 27 05:23:41 2008
@@ -70,6 +70,16 @@
       <scope>test</scope>
     </dependency>
     <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>javax.annotation</groupId>
+      <artifactId>jsr250-api</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>org.apache.activemq</groupId>
       <artifactId>activemq-core</artifactId>
       <scope>test</scope>

Added: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/remoting/RemotingTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/remoting/RemotingTest.java?rev=641792&view=auto
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/remoting/RemotingTest.java (added)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/remoting/RemotingTest.java Thu Mar 27 05:23:41 2008
@@ -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 org.apache.camel.component.jms.remoting;
+
+import javax.annotation.Resource;
+
+import org.apache.camel.spring.remoting.ISay;
+import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
+import org.springframework.test.context.ContextConfiguration;
+
+/**
+ * @version $Revision: 1.1 $
+ */
+@ContextConfiguration
+public class RemotingTest extends AbstractJUnit38SpringContextTests {
+    @Resource
+    protected ISay sayProxy;
+
+    public void testInvokeRemoteClient() throws Exception {
+        String rc = sayProxy.say();
+        assertEquals("Hello", rc);
+    }
+}

Propchange: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/remoting/RemotingTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/remoting/RemotingTest-context.xml (from r641728, activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/remoting/spring.xml)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/remoting/RemotingTest-context.xml?p2=activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/remoting/RemotingTest-context.xml&p1=activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/remoting/spring.xml&r1=641728&r2=641792&rev=641792&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/remoting/spring.xml (original)
+++ activemq/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/remoting/RemotingTest-context.xml Thu Mar 27 05:23:41 2008
@@ -25,19 +25,19 @@
 
   <bean id="sayService" class="org.apache.camel.spring.remoting.SayService" scope="singleton"/>
 
-  <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
+  <camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
     <!-- create the client proxy -->
-    <proxy id="sayProxy" serviceUrl="activemq:test.serviceQueue"
+    <proxy id="sayProxy" serviceUrl="jms:test.serviceQueue"
            serviceInterface="org.apache.camel.spring.remoting.ISay"/>
 
     <!-- export the service -->
-    <export id="say" uri="activemq:test.serviceQueue" serviceRef="sayService"
+    <export id="say" uri="jms:test.serviceQueue" serviceRef="sayService"
             serviceInterface="org.apache.camel.spring.remoting.ISay"/>
 
   </camelContext>
 
-  <!-- configure the ActiveMQ component -->
-  <bean id="activemq" class="org.apache.camel.component.jms.JmsComponent">
+  <!-- configure the JMS component -->
+  <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
     <property name="connectionFactory">
       <bean class="org.apache.activemq.spring.ActiveMQConnectionFactory">
         <property name="brokerURL" value="vm://localhost?broker.persistent=false"/>

Modified: activemq/camel/trunk/components/camel-spring/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/pom.xml?rev=641792&r1=641791&r2=641792&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-spring/pom.xml (original)
+++ activemq/camel/trunk/components/camel-spring/pom.xml Thu Mar 27 05:23:41 2008
@@ -67,6 +67,11 @@
       <scope>test</scope>
     </dependency>
     <dependency>
+      <groupId>javax.annotation</groupId>
+      <artifactId>jsr250-api</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>org.apache.camel</groupId>
       <artifactId>camel-core</artifactId>
       <type>test-jar</type>

Modified: activemq/camel/trunk/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/pom.xml?rev=641792&r1=641791&r2=641792&view=diff
==============================================================================
--- activemq/camel/trunk/pom.xml (original)
+++ activemq/camel/trunk/pom.xml Thu Mar 27 05:23:41 2008
@@ -617,6 +617,12 @@
         <version>${spring-version}</version>
       </dependency>
 
+      <dependency>
+        <groupId>javax.annotation</groupId>
+        <artifactId>jsr250-api</artifactId>
+        <version>1.0</version>
+      </dependency>
+
 
       <!-- optional mina dependencies -->
       <dependency>