Author: buildbot Date: Sun May 10 17:18:37 2015 New Revision: 950833 Log: Production update by buildbot for camel
Modified: websites/production/camel/content/blueprint-testing.html websites/production/camel/content/cache/main.pageCache Modified: websites/production/camel/content/blueprint-testing.html ============================================================================== --- websites/production/camel/content/blueprint-testing.html (original) +++ websites/production/camel/content/blueprint-testing.html Sun May 10 17:18:37 2015 @@ -209,7 +209,20 @@ protected String getBundleFilter() { <to uri="mock:result"/> </route> ]]></script> -</div></div></div> +</div></div><p> </p><p><span>From </span><strong>Camel 2.16.0</strong><span>, an additional </span><span><code>addServicesOnStartup</code> method is available to be overridden making it ideal for when needing to specify multiple services with the same interface.</span><span> </span></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ @Override + protected void addServicesOnStartup(List<KeyValueHolder<String, KeyValueHolder<Object, Dictionary>>> services) { + Dictionary<String, String> dict1 = new Hashtable<String, String>(); + dict1.put("osgi.jndi.service.name", "jdbc/db1"); + Â + Dictionary<String, String> dict2 = new Hashtable<String, String>(); + dict2.put("osgi.jndi.service.name", "jdbc/db2"); + Â + services.add(asKeyValueService(javax.sql.DataSource.class.getName(), mockService1, dict1)); + services.add(asKeyValueService(javax.sql.DataSource.class.getName(), mockService2, dict2)); + } +]]></script> +</div></div><p><span>The <code>asKeyValueService</code> builder method can be used to construct the necessary parameters to create the service. The method takes in the name of the registered service, the object, and and a <code><span>Dictionary</span></code> as arguments.</span></p></div> </td> <td valign="top"> <div class="navigation"> Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available.