Author: buildbot
Date: Fri Apr 26 07:18:13 2013
New Revision: 859965
Log:
Production update by buildbot for camel
Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/guice-jms-example.html
Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/camel/content/guice-jms-example.html
==============================================================================
--- websites/production/camel/content/guice-jms-example.html (original)
+++ websites/production/camel/content/guice-jms-example.html Fri Apr 26
07:18:13 2013
@@ -80,7 +80,7 @@
<p>The Guice JMS example is functionally similar to both the <a shape="rect"
href="walk-through-an-example.html" title="Walk through an Example">first
example</a> and the <a shape="rect" href="spring-example.html" title="Spring
Example">Spring Example</a> but using <a shape="rect" href="guice.html"
title="Guice">Guice</a> as the Dependency Injection framework.</p>
-<p>In this example we just write RouteBuilder implementations, then we write a
Guice module <a shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-guice-jms/src/main/java/org/apache/camel/example/guice/jms/MyModule.java">MyModule</a>
to create the CamelContext, bind any RouteBuilder instances and configure any
components and endpoints, then we create a <a shape="rect"
class="external-link"
href="http://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-guice-jms/src/main/resources/jndi.properties">jndi.properties</a>
file to bootstrap Guice and Camel.</p>
+<p>In this example we just write RouteBuilder implementations, then we write a
Guice module <a shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-guice-jms/src/main/java/org/apache/camel/example/guice/jms/MyModule.java">MyModule</a>
to create the CamelContext, bind any RouteBuilder instances and configure any
components and endpoints, then we create a <a shape="rect"
class="external-link"
href="http://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-guice-jms/src/main/resources/guicejndi.properties">guicejndi.properties</a>
file to bootstrap Guice and Camel.</p>
<p>To run the example we currently use the maven exec plugin. For example from
the source or binary distribution the following should work</p>
@@ -91,16 +91,15 @@ mvn compile exec:java
</pre>
</div></div>
-<p>What this does is boot up the Guice based JNDI provider from <a
shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-guice-jms/src/main/resources/jndi.properties">jndi.properties</a>
file on the classpath. This then bootstraps the Guice injector and loads
whatever Guice modules are defined in the jndi.properties file - then injects
the remaining properties in the file.</p>
+<p>What this does is boot up the Guice based JNDI provider from <a
shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-guice-jms/src/main/resources/guicejndi.properties">guicejndi.properties</a>
file on the classpath. This then bootstraps the Guice injector and loads
whatever Guice modules are defined in the guicejndi.properties file - then
injects the remaining properties in the file.</p>
<h3><a shape="rect"
name="GuiceJMSExample-ConfiguringComponents"></a>Configuring Components</h3>
<p>If you see the <b>jms()</b> method of the Guice <a shape="rect"
class="external-link"
href="http://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-guice-jms/src/main/java/org/apache/camel/example/guice/jms/MyModule.java">MyModule</a>
you will see it is annotated with <b>@Provides</b> to indicate to Guice that
it is a provider and it is annotated with <b>@JndiBind("jms")</b> to bind it to
the JNDI name <b>jms</b> when it is created. </p>
-<p>This method then configures the component. The provider method is
parameterized by the <b>@Named("activemq.brokerURL")</b> property which is
injected from the <a shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-guice-jms/src/main/resources/jndi.properties">jndi.properties</a>
file. This lets you define the properties which should be environment specific
(such as URLs, machine names, usernames/passwords and so forth) while leaving
all of the other configuration which does not change in different environments
in Java code.</p>
-
-<p>So you can use <a shape="rect" href="guice.html" title="Guice">Guice</a> to
dependency inject whatever objects you need to create, be it an <a shape="rect"
href="endpoint.html" title="Endpoint">Endpoint</a>, <a shape="rect"
href="component.html" title="Component">Component</a>, <a shape="rect"
href="routebuilder.html" title="RouteBuilder">RouteBuilder</a> or arbitrary <a
shape="rect" href="bean-integration.html" title="Bean Integration">bean used
within a route</a>. Then you can inject any properties from the jndi.properties
file easily - so that most of your configuration is all in Java code which is
typesafe and easily refactorable - then leaving some properties to be
environment specific (the jndi.properties file) which you can then change based
on development, testing, production etc.</p>
+<p>This method then configures the component. The provider method is
parameterized by the <b>@Named("activemq.brokerURL")</b> property which is
injected from the <a shape="rect" class="external-link"
href="http://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-guice-jms/src/main/resources/guicejndi.properties">guicejndi.properties</a>
file. This lets you define the properties which should be environment specific
(such as URLs, machine names, usernames/passwords and so forth) while leaving
all of the other configuration which does not change in different environments
in Java code.</p>
+<p>So you can use <a shape="rect" href="guice.html" title="Guice">Guice</a> to
dependency inject whatever objects you need to create, be it an <a shape="rect"
href="endpoint.html" title="Endpoint">Endpoint</a>, <a shape="rect"
href="component.html" title="Component">Component</a>, <a shape="rect"
href="routebuilder.html" title="RouteBuilder">RouteBuilder</a> or arbitrary <a
shape="rect" href="bean-integration.html" title="Bean Integration">bean used
within a route</a>. Then you can inject any properties from the jndi.properties
file easily - so that most of your configuration is all in Java code which is
typesafe and easily refactorable - then leaving some properties to be
environment specific (the guicejndi.properties file) which you can then change
based on development, testing, production etc.</p>
</div>
</td>
<td valign="top">