Diana,

Most of the time, the easiest solution would be to store configuration
values like that in a .cfg file in the etc folder. Updates of those
files are automatically monitored and using the ConfigurationAdmin
service, your beans/routes/... can get updated values very easily.

If you do prefer to use XML files, Karaf/ServiceMix has out-of-the-box
support for Spring and Blueprint files and will monitor those for
changes in the deploy folder. If you could use a Spring/Blueprint file
to set up a bean with configuration values and store that in the OSGi
Service Registry, you would have a working solution as well.

If your application requires a custom XML file to be hot-deployable, I
would recommend you to take a look at the Karaf implementations for
the Spring and Blueprint deployer.


Regards,

Gert Vanthienen


On Fri, Aug 22, 2014 at 6:34 AM, Sana <[email protected]> wrote:
> Hi,
>
> I have an xml file which have environment specific urls configured. So, I
> want to externalize it and access the file from inside the bundle. I can
> acheive this by the normal way of setting a system variable. But i do not
> want to restart service mix everytime there is a change in the xml file. How
> can I acheive this, my bundle to pick the changes in an external file
> without restarting servicemix?
>
> Appreciate your input.
>
> Thanks and Regards,
> Diana
>
>
>
> --
> View this message in context: 
> http://servicemix.396122.n5.nabble.com/how-to-configure-an-external-xml-file-tp5721593.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to