Modified: websites/production/camel/content/properties.html
==============================================================================
--- websites/production/camel/content/properties.html (original)
+++ websites/production/camel/content/properties.html Fri Jul  8 21:25:13 2016
@@ -195,8 +195,7 @@ from("direct:start")
     .transform().simple("Hi ${body}. 
${properties:com/mycompany/bar.properties:bar.quote}.");
 ]]></script>
 </div></div><h3 
id="Properties-AdditionalpropertyplaceholdersupportedinSpringXML">Additional 
property placeholder supported in Spring XML</h3><p>The property placeholders 
is also supported in many of the Camel Spring XML tags such as 
<code>&lt;package&gt;, &lt;packageScan&gt;, &lt;contextScan&gt;, 
&lt;jmxAgent&gt;, &lt;endpoint&gt;, &lt;routeBuilder&gt;, &lt;proxy&gt;</code> 
and the others.</p><p>The example below has property placeholder in the 
&lt;jmxAgent&gt; tag:</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-&lt;camelContext xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;camelContext 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
     &lt;propertyPlaceholder id=&quot;properties&quot; 
location=&quot;org/apache/camel/spring/jmx.properties&quot;/&gt;
 
     &lt;!-- we can use propery placeholders when we define the JMX agent --&gt;
@@ -211,11 +210,9 @@ from(&quot;direct:start&quot;)
         &lt;to uri=&quot;mock:result&quot;/&gt;
     &lt;/route&gt;
 
-&lt;/camelContext&gt;
-]]></script>
-</div></div>You can also define property placeholders in the various 
attributes on the &lt;camelContext&gt; tag such as <code>trace</code> as shown 
here:<div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-&lt;camelContext trace=&quot;{{foo.trace}}&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
+&lt;/camelContext&gt;]]></script>
+</div></div><p>You can also define property placeholders in the various 
attributes on the &lt;camelContext&gt; tag such as <code>trace</code> as shown 
here:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;camelContext 
trace=&quot;{{foo.trace}}&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
     &lt;propertyPlaceholder id=&quot;properties&quot; 
location=&quot;org/apache/camel/spring/processor/myprop.properties&quot;/&gt;
 
     &lt;template id=&quot;camelTemplate&quot; 
defaultEndpoint=&quot;{{foo.cool}}&quot;/&gt;
@@ -227,8 +224,7 @@ from(&quot;direct:start&quot;)
         &lt;/setHeader&gt;
         &lt;to uri=&quot;mock:result&quot;/&gt;
     &lt;/route&gt;
-&lt;/camelContext&gt;
-]]></script>
+&lt;/camelContext&gt;]]></script>
 </div></div><h3 
id="Properties-OverridingapropertysettingusingaJVMSystemProperty">Overriding a 
property setting using a JVM System Property</h3><p><strong>Available as of 
Camel 2.5</strong><br clear="none"> It is possible to override a property value 
at runtime using a JVM System property without the need to restart the 
application to pick up the change. This may also be accomplished from the 
command line by creating a JVM System property of the same name as the property 
it replaces with a new value. An example of this is given below</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[PropertiesComponent pc = 
context.getComponent(&quot;properties&quot;, PropertiesComponent.class);
 pc.setCache(false);
@@ -256,8 +252,7 @@ System.clearProperty(&quot;cool.result&q
 assertMockEndpointsSatisfied();
 ]]></script>
 </div></div><h3 
id="Properties-UsingpropertyplaceholdersforanykindofattributeintheXMLDSL">Using 
property placeholders for any kind of attribute in the XML 
DSL</h3><p><strong>Available as of Camel 2.7</strong></p><div 
class="confluence-information-macro 
confluence-information-macro-information"><span class="aui-icon aui-icon-small 
aui-iconfont-info confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>If you use OSGi Blueprint then 
this only works from <strong>2.11.1</strong> or <strong>2.10.5</strong> 
onwards.</p></div></div><p>Previously it was only the <code>xs:string</code> 
type attributes in the XML DSL that support placeholders. For example often a 
timeout attribute would be a <code>xs:int</code> type and thus you cannot set a 
string value as the placeholder key. This is now possible from Camel 2.7 
onwards using a special placeholder namespace.</p><p>In the example below we 
use the <code>prop</code> prefix for the namespace <code><a shape="
 rect" class="external-link" 
href="http://camel.apache.org/schema/placeholder";>http://camel.apache.org/schema/placeholder</a></code>
 by which we can use the <code>prop</code> prefix in the attributes in the XML 
DSLs. Notice how we use that in the <a shape="rect" 
href="multicast.html">Multicast</a> to indicate that the option 
<code>stopOnException</code> should be the value of the placeholder with the 
key "stop".</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;beans 
xmlns=&quot;http://www.springframework.org/schema/beans&quot;
        xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
        xmlns:prop=&quot;http://camel.apache.org/schema/placeholder&quot;
        xsi:schemaLocation=&quot;
@@ -290,19 +285,16 @@ assertMockEndpointsSatisfied();
 
     &lt;/camelContext&gt;
 
-&lt;/beans&gt;
-]]></script>
-</div></div>In our properties file we have the value defined as<div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+&lt;/beans&gt;]]></script>
+</div></div><p>In our properties file we have the value defined as</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[stop=true
 ]]></script>
 </div></div><h3 id="Properties-UsingpropertyplaceholderintheJavaDSL">Using 
property placeholder in the Java DSL</h3><p><strong>Available as of Camel 
2.7</strong></p><p>Likewise we have added support for defining placeholders in 
the Java DSL using the new <code>placeholder</code> DSL as shown in the 
following equivalent example:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-from(&quot;direct:start&quot;)
-    // use a property placeholder for the option stopOnException on the 
Multicast EIP
-    // which should have the value of {{stop}} key being looked up in the 
properties file
-    .multicast().placeholder(&quot;stopOnException&quot;, &quot;stop&quot;)
-        .to(&quot;mock:a&quot;).throwException(new 
IllegalAccessException(&quot;Damn&quot;)).to(&quot;mock:b&quot;);
-]]></script>
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[                from(&quot;direct:start&quot;)
+                    // use a property placeholder for the option 
stopOnException on the Multicast EIP
+                    // which should have the value of {{stop}} key being 
looked up in the properties file
+                    .multicast().placeholder(&quot;stopOnException&quot;, 
&quot;stop&quot;)
+                        .to(&quot;mock:a&quot;).throwException(new 
IllegalAccessException(&quot;Damn&quot;)).to(&quot;mock:b&quot;);]]></script>
 </div></div><h3 
id="Properties-UsingBlueprintpropertyplaceholderwithCamelroutes">Using 
Blueprint property placeholder with Camel routes</h3><p><strong>Available as of 
Camel 2.7</strong></p><p>Camel supports <a shape="rect" 
href="using-osgi-blueprint-with-camel.html">Blueprint</a> which also offers a 
property placeholder service. Camel supports convention over configuration, so 
all you have to do is to define the OSGi Blueprint property placeholder in the 
XML file as shown below:</p><div class="error"><span class="error">Error 
formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, 
Size: 20</span> </div>By default Camel detects and uses OSGi blueprint property 
placeholder service. You can disable this by setting the attribute 
<code>useBlueprintPropertyResolver</code> to false on the 
<code>&lt;camelContext&gt;</code> definition.<div 
class="confluence-information-macro 
confluence-information-macro-information"><p class="title">About placeholder 
syntaxes</p><span clas
 s="aui-icon aui-icon-small aui-iconfont-info 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>Notice how we can use the Camel 
syntax for placeholders {{ }} in the Camel route, which will lookup the value 
from OSGi blueprint.<br clear="none"> The blueprint syntax for placeholders is 
${ }. So outside the &lt;camelContext&gt; you must use the ${ } syntax. Where 
as inside &lt;camelContext&gt; you must use {{ }} syntax.<br clear="none"> OSGi 
blueprint allows you to configure the syntax, so you can actually align those 
if you want.</p></div></div><p>You can also explicit refer to a specific OSGi 
blueprint property placeholder by its id. For that you need to use the Camel's 
&lt;propertyPlaceholder&gt; as shown in the example below:</p><div 
class="error"><span class="error">Error formatting macro: snippet: 
java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>Notice 
how we use the <code>blueprint</code> scheme to refer to the OSGi b
 lueprint placeholder by its id. This allows you to mix and match, for example 
you can also have additional schemes in the location. For example to load a 
file from the classpath you can do:<div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[location=&quot;blueprint:myblueprint.placeholder,classpath:myproperties.properties&quot;
 ]]></script>

Modified: websites/production/camel/content/servlet-tomcat-example.html
==============================================================================
--- websites/production/camel/content/servlet-tomcat-example.html (original)
+++ websites/production/camel/content/servlet-tomcat-example.html Fri Jul  8 
21:25:13 2016
@@ -123,7 +123,7 @@
 
 &lt;/web-app&gt;
 ]]></script>
-</div></div><p>The route is a simple <a shape="rect" 
href="content-based-router.html">Content Based Router</a> defined in the DSL 
XML as shown:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeHeader panelHeader pdl" style="border-bottom-width: 
1px;"><b>camel-config.xml</b></div><div class="codeContent panelContent pdl">
+</div></div>The route is a simple <a shape="rect" 
href="content-based-router.html">Content Based Router</a> defined in the DSL 
XML as shown:<div class="code panel pdl" style="border-width: 1px;"><div 
class="codeHeader panelHeader pdl" style="border-bottom-width: 
1px;"><b>camel-config.xml</b></div><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 &lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
        xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;


Reply via email to