Configurations - 7.0

Talend ESB Container Administration Guide

Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Administration and Monitoring
Design and Development
Installation and Upgrade
Talend ESB

The configuration section allows to deploy configuration for the OSGi Configuration Admin service along a set of bundles. Here is an example of such a configuration:

<config name="">
   myProperty = myValue

The name attribute of the configuration element will be used as the ManagedService PID for the configuration set in the Configuration Admin service. When using a ManagedServiceFactory, the name attribute is servicePid-_aliasId_, where servicePid is the PID of the ManagedServiceFactory and aliasId is a label used to uniquely identify a particular service (an alias to the factory generated service PID). Deploying such a configuration has the same effect than dropping a file named into the etc folder.

The content of the configuration element is set of properties parsed using the standard java property mechanism. Such configuration as usually used with Spring-DM or Blueprint support for the Configuration Admin service, as in the following example, but using plain OSGi APIs will of course work the same way:

<bean ...>
   <property name="propertyName" value="${myProperty}" />
<osgix:cm-properties id="cmProps" persistent-id="">
   <prop key="myProperty">myValue</prop>
<ctx:property-placeholder properties-ref="cmProps" />

There may also be cases where you want to make the properties from multiple configuration files available to your bundle context. This is something you may want to do if you have a multi-bundle application where there are application properties used by multiple bundles, and each bundle has its own specific properties. In that case, <ctx:property-placeholder> won't work as it was designed to make only one configuration file available to a bundle context. To make more than one configuration file available to your bundle-context you would do something like this:

<beans:bean id="myBundleConfigurer" class=
   <beans:property name="ignoreUnresolvablePlaceholders" value="true"/>
   <beans:property name="propertiesArray">
      <osgix:cm-properties id="myAppProps" persistent-id="myApp.props"/>
      <osgix:cm-properties id="myBundleProps" 

In this example, we are using SpringDM with osgi as the primary namespace. Instead of using ctx:context-placeholder we are using the "PropertyPlaceholderConfig" class. Then we are passing in a beans array and inside of that array is where we set our osgix:cm-properties elements. This element "returns" a properties bean.

For more informations about using the Configuration Admin service in Spring-DM, see the Spring-DM documentation.