Author: jstrachan
Date: Tue Oct 21 03:07:25 2008
New Revision: 706569
URL: http://svn.apache.org/viewvc?rev=706569&view=rev
Log:
tidied up the comments of the Guice JMS example
Modified:
activemq/camel/trunk/examples/camel-example-guice-jms/README.txt
activemq/camel/trunk/examples/camel-example-guice-jms/src/main/java/org/apache/camel/example/guice/jms/MyModule.java
activemq/camel/trunk/examples/camel-example-guice-jms/src/main/resources/jndi.properties
Modified: activemq/camel/trunk/examples/camel-example-guice-jms/README.txt
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-guice-jms/README.txt?rev=706569&r1=706568&r2=706569&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-guice-jms/README.txt (original)
+++ activemq/camel/trunk/examples/camel-example-guice-jms/README.txt Tue Oct 21
03:07:25 2008
@@ -1,7 +1,7 @@
Spring Example
==============
-This example shows how to work with files and JMS, using Spring to boot up
+This example shows how to work with files and JMS, using Guice to boot up
Camel and configure the routes. It can be run using Maven or Ant.
The example consumes messages from a queue and writes them to the file
@@ -28,20 +28,13 @@
ant camel.dot
You can see the routing rules by looking at the java code in the
-src/main/java directory and the Spring XML configuration lives in
-src/main/resources/META-INF/spring
+src/main/java directory and the jndi.properties file lives in
+src/main/resources/jndi.properties
To stop the example hit ctrl + c
-To use log4j as the logging framework add this to the pom.xml:
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
-and log4j.properties is located in src/main/resources
-
For the latest & greatest documentation on how to use this example please see
- http://activemq.apache.org/camel/spring-example.html
+ http://activemq.apache.org/camel/guice-jms-example.html
If you hit any problems please talk to us on the Camel Forums
http://activemq.apache.org/camel/discussion-forums.html
Modified:
activemq/camel/trunk/examples/camel-example-guice-jms/src/main/java/org/apache/camel/example/guice/jms/MyModule.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-guice-jms/src/main/java/org/apache/camel/example/guice/jms/MyModule.java?rev=706569&r1=706568&r2=706569&view=diff
==============================================================================
---
activemq/camel/trunk/examples/camel-example-guice-jms/src/main/java/org/apache/camel/example/guice/jms/MyModule.java
(original)
+++
activemq/camel/trunk/examples/camel-example-guice-jms/src/main/java/org/apache/camel/example/guice/jms/MyModule.java
Tue Oct 21 03:07:25 2008
@@ -25,20 +25,25 @@
import com.google.inject.name.Named;
/**
+ * Configures the CamelContext, RouteBuilder, Component and Endpoint instances
using
+ * Guice
+ *
* @version $Revision$
*/
public class MyModule extends CamelModuleWithMatchingRoutes {
@Override
protected void configure() {
- System.out.println("Configuring JMS module!!!");
super.configure();
- System.out.println("Adding my module!");
-
+ // lets add in any RouteBuilder instances we want to use
bind(MyRouteBuilder.class);
}
+ /**
+ * Lets configure the JMS component, parameterizing some properties from
the
+ * jndi.properties file
+ */
@Provides
@JndiBind("jms")
JmsComponent jms(@Named("activemq.brokerURL") String brokerUrl) {
Modified:
activemq/camel/trunk/examples/camel-example-guice-jms/src/main/resources/jndi.properties
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-guice-jms/src/main/resources/jndi.properties?rev=706569&r1=706568&r2=706569&view=diff
==============================================================================
---
activemq/camel/trunk/examples/camel-example-guice-jms/src/main/resources/jndi.properties
(original)
+++
activemq/camel/trunk/examples/camel-example-guice-jms/src/main/resources/jndi.properties
Tue Oct 21 03:07:25 2008
@@ -26,5 +26,5 @@
# list of guice modules to boot up (space separated)
org.guiceyfruit.modules = org.apache.camel.example.guice.jms.MyModule
-#Êbound properties
+# bound properties injected to @Named injection points
activemq.brokerURL = vm://broker1?marshal=false&broker.persistent=false
\ No newline at end of file