svn commit: r566219 - /activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r566219 - /activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java

jstrachan-2
Author: jstrachan
Date: Wed Aug 15 08:28:52 2007
New Revision: 566219

URL: http://svn.apache.org/viewvc?view=rev&rev=566219
Log:
added a main() so its easy to run from an IDE

Modified:
    activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java

Modified: activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java?view=diff&rev=566219&r1=566218&r2=566219
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java (original)
+++ activemq/camel/trunk/examples/camel-example-spring/src/main/java/org/apache/camel/example/spring/MyRouteBuilder.java Wed Aug 15 08:28:52 2007
@@ -19,6 +19,7 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.spring.Main;
 
 /**
  * A simple example router from an ActiveMQ queue to a file system
@@ -26,6 +27,15 @@
  * @version $Revision: 1.1 $
  */
 public class MyRouteBuilder extends RouteBuilder {
+
+    /**
+     * Allow this route to be run as an application
+     * @param args
+     */
+    public static void main(String[] args) {
+        new Main().run(args);
+    }
+
     public void configure() {
         from("activemq:test.MyQueue").to("file://test");