You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2016/05/08 17:24:23 UTC

svn commit: r987740 [5/5] - in /websites/production/camel/content: ./ cache/

Modified: websites/production/camel/content/using-propertyplaceholder.html
==============================================================================
--- websites/production/camel/content/using-propertyplaceholder.html (original)
+++ websites/production/camel/content/using-propertyplaceholder.html Sun May  8 17:24:22 2016
@@ -300,71 +300,7 @@ from("direct:start")
     .multicast().placeholder("stopOnException", "stop")
         .to("mock:a").throwException(new IllegalAccessException("Damn")).to("mock:b");
 ]]></script>
-</div></div><h3 id="UsingPropertyPlaceholder-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="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Using OSGi blueprint property placeholders in Camel routes</b></div><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;blueprint xmlns=&quot;http://www.osgi.org/xmlns/blueprint/v1.0.0&quot;
-           xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
-           xmlns:cm=&quot;http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0&quot;
-           xsi:schemaLocation=&quot;
-           http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd&quot;&gt;
-
-    &lt;!-- OSGI blueprint property placeholder --&gt;
-    &lt;cm:property-placeholder id=&quot;myblueprint.placeholder&quot; persistent-id=&quot;camel.blueprint&quot;&gt;
-        &lt;!-- list some properties for this test --&gt;
-        &lt;cm:default-properties&gt;
-            &lt;cm:property name=&quot;result&quot; value=&quot;mock:result&quot;/&gt;
-        &lt;/cm:default-properties&gt;
-    &lt;/cm:property-placeholder&gt;
-
-    &lt;camelContext xmlns=&quot;http://camel.apache.org/schema/blueprint&quot;&gt;
-
-        &lt;!-- in the route we can use {{ }} placeholders which will lookup in blueprint
-             as Camel will auto detect the OSGi blueprint property placeholder and use it --&gt;
-        &lt;route&gt;
-            &lt;from uri=&quot;direct:start&quot;/&gt;
-            &lt;to uri=&quot;mock:foo&quot;/&gt;
-            &lt;to uri=&quot;{{result}}&quot;/&gt;
-        &lt;/route&gt;
-
-    &lt;/camelContext&gt;
-
-&lt;/blueprint&gt;
-]]></script>
-</div></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 class="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 re
 fer 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="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Explicit referring to a OSGi blueprint placeholder in Camel</b></div><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;blueprint xmlns=&quot;http://www.osgi.org/xmlns/blueprint/v1.0.0&quot;
-           xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
-           xmlns:cm=&quot;http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0&quot;
-           xsi:schemaLocation=&quot;
-           http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd&quot;&gt;
-
-    &lt;!-- OSGI blueprint property placeholder --&gt;
-    &lt;cm:property-placeholder id=&quot;myblueprint.placeholder&quot; persistent-id=&quot;camel.blueprint&quot;&gt;
-        &lt;!-- list some properties for this test --&gt;
-        &lt;cm:default-properties&gt;
-            &lt;cm:property name=&quot;prefix.result&quot; value=&quot;mock:result&quot;/&gt;
-        &lt;/cm:default-properties&gt;
-    &lt;/cm:property-placeholder&gt;
-
-    &lt;camelContext xmlns=&quot;http://camel.apache.org/schema/blueprint&quot;&gt;
-
-        &lt;!-- using Camel properties component and refer to the blueprint property placeholder by its id --&gt;
-        &lt;propertyPlaceholder id=&quot;properties&quot; location=&quot;blueprint:myblueprint.placeholder&quot;
-                             prefixToken=&quot;[[&quot; suffixToken=&quot;]]&quot;
-                             propertyPrefix=&quot;prefix.&quot;/&gt;
-
-        &lt;!-- in the route we can use {{ }} placeholders which will lookup in blueprint --&gt;
-        &lt;route&gt;
-            &lt;from uri=&quot;direct:start&quot;/&gt;
-            &lt;to uri=&quot;mock:foo&quot;/&gt;
-            &lt;to uri=&quot;[[result]]&quot;/&gt;
-        &lt;/route&gt;
-
-    &lt;/camelContext&gt;
-
-&lt;/blueprint&gt;
-]]></script>
-</div></div>Notice how we use the <code>blueprint</code> scheme to refer to the OSGi blueprint 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">
+</div></div><h3 id="UsingPropertyPlaceholder-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 class="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 blueprint 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>
 </div></div><p>Each location is separated by comma.</p><h4 id="UsingPropertyPlaceholder-OverridingBlueprintpropertyplaceholdersoutsideCamelContext">Overriding Blueprint property placeholders outside CamelContext</h4><p><strong>Available as of Camel 2.10.4</strong></p><p>When using Blueprint property placeholder in the Blueprint XML file, you can declare the properties directly in the XML file as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">

Modified: websites/production/camel/content/xml-reference.html
==============================================================================
--- websites/production/camel/content/xml-reference.html (original)
+++ websites/production/camel/content/xml-reference.html Sun May  8 17:24:22 2016
@@ -84,7 +84,7 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">

[... 6 lines stripped ...]