You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2008/04/20 14:47:26 UTC

svn commit: r649916 - in /activemq/camel/trunk/examples/camel-example-spring-jms: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/example/ src/main/java/org/example/client/ src/main/java/org/example/server/ src/main/resources/ src...

Author: ningjiang
Date: Sun Apr 20 05:47:22 2008
New Revision: 649916

URL: http://svn.apache.org/viewvc?rev=649916&view=rev
Log:
CAMEL-471 added the tutorial example into the example directory

Added:
    activemq/camel/trunk/examples/camel-example-spring-jms/   (with props)
    activemq/camel/trunk/examples/camel-example-spring-jms/pom.xml   (with props)
    activemq/camel/trunk/examples/camel-example-spring-jms/src/
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/client/
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/client/CamelClient.java   (with props)
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/client/CamelClientRemoting.java   (with props)
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/CamelServer.java   (with props)
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/JmsBroker.java   (with props)
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/Multiplier.java   (with props)
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/ServerRoutes.java   (with props)
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/Treble.java   (with props)
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/META-INF/
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server.xml   (with props)
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/camel-client-remoting.xml   (with props)
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/camel-client.xml   (with props)
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/log4j.xml   (with props)
    activemq/camel/trunk/examples/camel-example-spring-jms/src/test/
    activemq/camel/trunk/examples/camel-example-spring-jms/src/test/java/

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Apr 20 05:47:22 2008
@@ -0,0 +1,7 @@
+.project
+.pmd
+.checkstyle
+.classpath
+target
+.settings
+eclipse-classes

Added: activemq/camel/trunk/examples/camel-example-spring-jms/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-jms/pom.xml?rev=649916&view=auto
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-jms/pom.xml (added)
+++ activemq/camel/trunk/examples/camel-example-spring-jms/pom.xml Sun Apr 20 05:47:22 2008
@@ -0,0 +1,83 @@
+<?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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>examples</artifactId>
+    <version>1.4-SNAPSHOT</version>
+  </parent>
+  
+  <artifactId>camel-example-spring-jms</artifactId>
+  <name>Camel :: Example :: Spring :: JMS </name>
+  <description>An example using Spring XML to talk to the JMS server  </description>
+ 
+ <dependencies>
+    <dependency>
+      <groupId>log4j</groupId>
+	<artifactId>log4j</artifactId>
+      <version>1.2.14</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.activemq</groupId>
+      <artifactId>activemq-all</artifactId>
+      <version>5.0.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-jms</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-spring</artifactId>
+    </dependency>
+    
+    <!-- for testing -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  
+  <build>
+    <plugins>
+      <!-- Allows the routes to be run via 'mvn camel:run' -->
+      <plugin>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-maven-plugin</artifactId>
+      </plugin>      
+    </plugins>
+  </build>
+
+  <reporting>
+    <plugins>
+      <!-- Generates nice PNG / SVG diagrams from our routes -->
+      <plugin>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/client/CamelClient.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/client/CamelClient.java?rev=649916&view=auto
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/client/CamelClient.java (added)
+++ activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/client/CamelClient.java Sun Apr 20 05:47:22 2008
@@ -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 org.example.client;
+
+import org.apache.camel.CamelTemplate;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.component.jms.JmsExchange;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * Requires that the JMS broker is running, as well as CamelServer
+ *
+ * @author martin.gilday
+ */
+public final class CamelClient {
+
+    private CamelClient() {
+        // The main class
+    }
+
+    public static void main(final String[] args) {
+
+        ApplicationContext context = new ClassPathXmlApplicationContext("camel-client.xml");
+        CamelTemplate<JmsExchange> camelTemplate = (CamelTemplate)context.getBean("camelTemplate");
+
+        int response = (Integer)camelTemplate.sendBody("jms:queue:numbers", ExchangePattern.InOut, 22);
+        System.out.println("Invoking the multiply with 22, the result is " + response);
+        System.exit(0);
+
+    }
+
+}

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/client/CamelClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/client/CamelClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/client/CamelClientRemoting.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/client/CamelClientRemoting.java?rev=649916&view=auto
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/client/CamelClientRemoting.java (added)
+++ activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/client/CamelClientRemoting.java Sun Apr 20 05:47:22 2008
@@ -0,0 +1,44 @@
+/**
+ * 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.example.client;
+
+import org.example.server.Multiplier;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * Requires that the JMS broker is running, as well as CamelServer
+ *
+ * @author martin.gilday
+ */
+public final class CamelClientRemoting {
+
+    private CamelClientRemoting() {
+        // the main class
+    }
+
+    public static void main(final String[] args) {
+
+        ApplicationContext context = new ClassPathXmlApplicationContext("camel-client-remoting.xml");
+        Multiplier multiplier = (Multiplier)context.getBean("multiplierProxy");
+        int response = multiplier.multiply(22);
+        System.out.println("Invoking the multiply with 22, the result is " + response);
+        System.exit(0);
+
+    }
+
+}

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/client/CamelClientRemoting.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/client/CamelClientRemoting.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/CamelServer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/CamelServer.java?rev=649916&view=auto
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/CamelServer.java (added)
+++ activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/CamelServer.java Sun Apr 20 05:47:22 2008
@@ -0,0 +1,54 @@
+/**
+ * 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.example.server;
+
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * @author martin.gilday
+ */
+public final class CamelServer {
+    private CamelServer() {
+        // the main class
+    }
+
+    /**
+     * @param args
+     */
+    public static void main(final String[] args) {
+        JmsBroker broker = new JmsBroker();
+
+        try {
+            broker.start();
+            ApplicationContext context = new ClassPathXmlApplicationContext("META-INF/spring/camel-server.xml");
+            Thread.sleep(5 * 60 * 1000);
+        } catch (Exception e) {
+            // get the exception
+            e.printStackTrace();
+        } finally {
+            try {
+                broker.stop();
+            } catch (Exception e) {
+                // do nothing here
+            }
+            System.exit(0);
+        }
+
+    }
+
+}

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/CamelServer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/CamelServer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/JmsBroker.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/JmsBroker.java?rev=649916&view=auto
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/JmsBroker.java (added)
+++ activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/JmsBroker.java Sun Apr 20 05:47:22 2008
@@ -0,0 +1,104 @@
+/**
+ * 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.example.server;
+
+import java.io.File;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
+
+public final class JmsBroker {
+    JMSEmbeddedBroker jmsBrokerThread;
+    String jmsBrokerUrl = "tcp://localhost:61616";
+    String activeMQStorageDir;
+    public JmsBroker() {
+    }
+
+    public JmsBroker(String url) {
+        jmsBrokerUrl = url;
+    }
+    
+    public void start() throws Exception {
+        jmsBrokerThread = new JMSEmbeddedBroker(jmsBrokerUrl);
+        jmsBrokerThread.startBroker();
+    }
+    
+    public void stop() throws Exception {
+        synchronized (this) {
+            jmsBrokerThread.shutdownBroker = true;
+        }
+        if (jmsBrokerThread != null) {
+            jmsBrokerThread.join();
+        }
+        
+        jmsBrokerThread = null;
+    }
+    
+    class JMSEmbeddedBroker extends Thread {
+        boolean shutdownBroker;
+        final String brokerUrl;
+        Exception exception;
+        
+        
+        public JMSEmbeddedBroker(String url) {
+            brokerUrl = url;
+        }
+        
+        public void startBroker() throws Exception {
+            synchronized (this) {
+                super.start();
+                try {
+                    wait();
+                    if (exception != null) {
+                        throw exception;
+                    }
+                } catch (InterruptedException ex) {
+                    ex.printStackTrace();
+                }
+            }
+        }
+        
+        public void run() {
+            try {  
+                //ContainerWapper container;
+                BrokerService broker = new BrokerService();
+                synchronized (this) {                                     
+                    broker.setPersistenceAdapter(new MemoryPersistenceAdapter());                    
+                    broker.setTmpDataDirectory(new File("./target"));
+                    broker.addConnector(brokerUrl);
+                    broker.start();
+                    Thread.sleep(200);
+                    notifyAll();
+                }
+                synchronized (this) {
+                    while (!shutdownBroker) {
+                        wait(1000);
+                    }
+                }                
+                broker.stop();              
+                broker = null;                
+            } catch (Exception e) {
+                exception = e;
+                e.printStackTrace();
+            }
+        }
+        
+       
+    }
+}
+

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/JmsBroker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/JmsBroker.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/Multiplier.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/Multiplier.java?rev=649916&view=auto
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/Multiplier.java (added)
+++ activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/Multiplier.java Sun Apr 20 05:47:22 2008
@@ -0,0 +1,32 @@
+/**
+ * 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.example.server;
+
+/**
+ * @author martin.gilday
+ */
+public interface Multiplier {
+
+    /**
+     * Multiplies the given number by a pre-defined constant.
+     *
+     * @param originalNumber The number to be multiplied
+     * @return The result of the multiplication
+     */
+    int multiply(int originalNumber);
+
+}

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/Multiplier.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/Multiplier.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/ServerRoutes.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/ServerRoutes.java?rev=649916&view=auto
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/ServerRoutes.java (added)
+++ activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/ServerRoutes.java Sun Apr 20 05:47:22 2008
@@ -0,0 +1,36 @@
+/**
+ * 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.example.server;
+
+import org.apache.camel.builder.RouteBuilder;
+
+/**
+ * @author martin.gilday
+ */
+public class ServerRoutes extends RouteBuilder {
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.camel.builder.RouteBuilder#configure()
+     */
+    @Override
+    public void configure() throws Exception {
+        from("jms:queue:numbers").beanRef("multiplier", "multiply");
+    }
+
+}

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/ServerRoutes.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/ServerRoutes.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/Treble.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/Treble.java?rev=649916&view=auto
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/Treble.java (added)
+++ activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/Treble.java Sun Apr 20 05:47:22 2008
@@ -0,0 +1,36 @@
+/**
+ * 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.example.server;
+
+import org.springframework.stereotype.Service;
+
+/**
+ * @author martin.gilday
+ */
+@Service(value = "multiplier")
+public class Treble implements Multiplier {
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.example.server.Multiplier#multiply(int)
+     */
+    public int multiply(final int originalNumber) {
+        return originalNumber * 3;
+    }
+
+}

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/Treble.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/example/server/Treble.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server.xml?rev=649916&view=auto
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server.xml (added)
+++ activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server.xml Sun Apr 20 05:47:22 2008
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:context="http://www.springframework.org/schema/context"
+	xmlns:camel="http://activemq.apache.org/camel/schema/spring"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+		http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+		http://www.springframework.org/schema/context
+		http://schemas.leadx.com/spring/spring-context-2.5.xsd
+		http://activemq.apache.org/camel/schema/spring
+		http://activemq.apache.org/camel/schema/spring/camel-spring-1.3.0.xsd">
+
+	<context:component-scan base-package="org.example.server" />
+
+	<camel:camelContext id="camel">
+		<camel:package>org.example.server</camel:package>
+	</camel:camelContext>
+
+	<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
+		<property name="connectionFactory">
+			<bean class="org.apache.activemq.ActiveMQConnectionFactory">
+				<property name="brokerURL" value="tcp://localhost:61616" />
+			</bean>
+		</property>
+	</bean>
+
+</beans>
\ No newline at end of file

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/META-INF/spring/camel-server.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/camel-client-remoting.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/camel-client-remoting.xml?rev=649916&view=auto
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/camel-client-remoting.xml (added)
+++ activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/camel-client-remoting.xml Sun Apr 20 05:47:22 2008
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:camel="http://activemq.apache.org/camel/schema/spring"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+		http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+		http://activemq.apache.org/camel/schema/spring
+		http://activemq.apache.org/camel/schema/spring/camel-spring-1.3-SNAPSHOT.xsd">
+
+	<camel:camelContext id="camel" />
+	<camel:template id="camelTemplate" />
+	
+	<camel:proxy
+		id="multiplierProxy"
+		serviceInterface="org.example.server.Multiplier"
+		serviceUrl="jms:queue:numbers"
+	/>
+	
+	<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
+		<property name="connectionFactory">
+			<bean class="org.apache.activemq.ActiveMQConnectionFactory">
+				<property name="brokerURL" value="tcp://localhost:61616" />
+			</bean>
+		</property>
+	</bean>
+</beans>
\ No newline at end of file

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/camel-client-remoting.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/camel-client-remoting.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/camel-client-remoting.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/camel-client.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/camel-client.xml?rev=649916&view=auto
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/camel-client.xml (added)
+++ activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/camel-client.xml Sun Apr 20 05:47:22 2008
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:camel="http://activemq.apache.org/camel/schema/spring"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+		http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+		http://activemq.apache.org/camel/schema/spring
+		http://activemq.apache.org/camel/schema/spring/camel-spring-1.3-SNAPSHOT.xsd">
+
+	<camel:camelContext id="camel" />
+	<camel:template id="camelTemplate" />
+	
+	<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
+		<property name="connectionFactory">
+			<bean class="org.apache.activemq.ActiveMQConnectionFactory">
+				<property name="brokerURL" value="tcp://localhost:61616" />
+			</bean>
+		</property>
+	</bean>
+	
+
+</beans>
\ No newline at end of file

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/camel-client.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/camel-client.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/camel-client.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/log4j.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/log4j.xml?rev=649916&view=auto
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/log4j.xml (added)
+++ activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/log4j.xml Sun Apr 20 05:47:22 2008
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+	<!-- ===================================================================== -->
+	<!--  APPENDERS			                                                   -->
+	<!-- ===================================================================== -->
+
+	<!-- SERVER CONSOLE LOG -->
+	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+		<param name="Target" value="System.out" />
+		<param name="Threshold" value="INFO" />
+		<layout class="org.apache.log4j.PatternLayout">
+			<param name="ConversionPattern" value="%d %-5p [%c] %m%n" />
+		</layout>
+	</appender>
+
+	<!-- ===================================================================== -->
+	<!--  CATEGORIES				                                           -->
+	<!-- ===================================================================== -->
+
+	<!-- LeadX -->
+	<logger name="org.example">
+		<level value="DEBUG"/>
+	</logger>
+
+	<!-- Libraries -->
+	<logger name="org.springframework">
+		<level value="INFO" />
+	</logger>
+	
+	<!-- ===================================================================== -->
+	<!--  ROOT				                                  		           -->
+	<!-- ===================================================================== -->
+
+	<root>
+		<appender-ref ref="CONSOLE" />
+	</root>
+
+</log4j:configuration>
\ No newline at end of file

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/log4j.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/log4j.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/resources/log4j.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml