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.
