You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by rkmoquin <fr...@gmail.com> on 2013/06/15 02:56:53 UTC

RE: How to access data folder?

It's funny because a lot of example services seem to use the data directory
to store things.  I'm not one to say whether you should or shouldn't (though
in my opinion, I'm not sure where else you would store the database that you
know will exist), here is how you do it, you need to add the blueprint
extension namespace, a snippet of the blueprint tag is below:

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
          
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
          
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
....

Next, add the following element:

<ext:property-placeholder />

This will allow you to use to use karaf properties, such as the
${karaf.data} in a property tag like this:

<property name="dbDirectory" value="${karaf.data}/db"/>




--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-access-data-folder-tp4028895p4029044.html
Sent from the Karaf - User mailing list archive at Nabble.com.