What version are you using?  You shouldn't have to replicate the definition
into Camel context like that anymore.

        <cm:property-placeholder persistent-id="my.persistent.id">
                <cm:default-properties>
                        <cm:property name="someAddress" 
value="http://localhost"; />

                        <cm:property name="someValue" value="true" />
                </cm:default-properties>
        </cm:property-placeholder>

You can use the default properties for your testing and override them in
your .cfg file for deployment.

someAddress=http://anotheraddress.com
someValue=false

In CamelBlueprintTestSupport you can also override the properties.  You can
also assign a cfg file in there but I haven't found that to work very well.

I commonly keep my blueprint-properties.xml separate from my other camel
blueprint xml. That's for a couple of reasons.  If I want to use a different
properties set in my camel blueprint tests I then point it to the
blueprint-properties in the src/test/resources directory instead of the one
in the src/main/resources.

Remember that at deployment Karaf will load all the blueprint files it finds
in the OSGi-INF folder so there isn't anything special about putting these
files in separate places.  During testing however you do need to explicitly
set the files to use (naturally enough). To do that you simply specify them
to CBTS in a comma delimited String.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-reference-property-files-with-and-without-OSGI-tp5778806p5778809.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to