Sachin Handiekar

Sachin Handiekar


August 2013
M T W T F S S
« Jan   Feb »
 1234
567891011
12131415161718
19202122232425
262728293031  

Categories


Using External Properties in Apache Karaf [Fuse ESB]

Sachin HandiekarSachin Handiekar

Introduction

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


Blueprint 



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?

    Thanks,

    Joe Kampf


  • sree
    Posted on

    sree sree

    Reply Author

    Team,

    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