Sachin Handiekar
August 2013
« Jan   Feb »


Using External Properties in Apache Karaf [Fuse ESB]

Sachin HandiekarSachin Handiekar


In this example we will see how to use an external property file in Fuse ESB / Apache Karaf.

Creating a configuration file

Create a config file named sample.cfg in FUSE_HOME/etc with the following content.

Spring Configuration


Note : The default blueprint placeholder syntax (accessing the blueprint properties directly) is ${Key}. Hence, outside the scope of a camelContext element, the placeholder syntax you must use is ${Key}. Whereas, inside the scope of a camelContext element, the placeholder syntax you must use is {{Key}}.

Camel Route

Comments 5
  • rahul
    Posted on

    rahul rahul

    Reply Author

    I tried using property from cfg file, same way you have explained, but it not loading property… m still getting exception in this… is there anything i am missing…

  • rahul
    Posted on

    rahul rahul

    Reply Author

    Hi Sachin,

    I have recently started working on fuse esb, osgi.. i have some more question regarding osgi bundling and fuse..
    i.e. i am not able to import resource files from dependencies projects although i am using etc..
    can i some communication to you regarding this… ur mail, or group on stack overflow..

  • handiekar
    Posted on

    handiekar handiekar

    Reply Author

    Can you post the exception stacktrace here ?

  • Joseph Kampf
    Posted on

    Joseph Kampf Joseph Kampf

    Reply Author

    I noticed that you are naming the file sample.cfg and in your Spring XML you have:

    However in your Blueprint example you have:

    Does the name of the file have to match up with the persistent-id? For Spring? For Blueprint?


    Joe Kampf

  • sree
    Posted on

    sree sree

    Reply Author


    Do we have any sample spring configuration for apache karaf. It would be really good if we can configure the karaf configuration in the spring xml file.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.