Reputation: 41
How can i configure my Karaf Server in such a way that whenever there is a property file change, i should not restart my server for getting those changes in staead it should atomatically detect thos changes. I deploying my bundle in osgi Karaf Server. For loading property file i am using below configuration in my camel context.
<bean
class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer"
id="properties">
<property name="locations">
<list><value>file:etc/app/properties/env/env.properties</value>
<value>file:etc/vrol/security/ssl.properties
</value></list></property></bean>
Upvotes: 0
Views: 797
Reputation: 19626
You are currently not using an OSGi mechanism to load the property file. As far as I know you can only achieve this by switching from spring to blueprint.
In blueprint you can define a config like this:
<cm:property-placeholder persistent-id="myconfig" update-strategy="reload" >
</cm:property-placeholder>
This will load the config from etc/myconfig.cfg and will reload the blueprint context when the config changes.
Upvotes: 1