Question

I experience something rather strange and I would like to know if other people have experienced the same...

I am currently working on a project using jboss fuse (previously fuse esb) and we are using blueprint for our configuration files. We use property place holders and have the following files under src/main/resources/OSGI-INF/blueprint: blueprint.xml properties.xml

In blueprint.xml we have something like this:

<bean id="myBean" class="com.test.MyClass">
    <property name="prop1" value="${my.prop}" />
<∕bean>

Then in properties.xml I have this:

<cm:property-placeholder persistent-id="my.properties" update-strategy="reload">
    <cm:default-properties>
        <cm:property name="my.prop" value="true" />
    </cm:default-properties>
</cm:property-placeholder>

And I obviously have a setter for prop1 (which is a String) in MyClass.

But what I see is that when I deploy this, prop1 is set to "${my.prop}" instead of "true", i.e the variable never gets replaced with its defined value!

But now if I call the properties file aaa_properties.xml, it works!!

Is this a bug in the blueprint container? Did any one else experience the same behaviour?

Thanks for your feedback :)

JM.

Was it helpful?

Solution

I found some information about Blueprint Configuration in Fuse ESB

It states:

If you need to place your blueprint configuration files in a non-standard location (that is, somewhere other than OSGI-INF/blueprint/*.xml), you can specify a comma-separated list of alternative locations in the Bundle-Blueprint header in the manifest

For Example:

Bundle-Blueprint: lib/account.xml, security.bp, cnf/*.xml

I suggest, can you please give this a try, and specify your xml files here, naturally in the correct ordering.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top