You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Clement Jebakumar <je...@gmail.com> on 2013/05/30 18:46:45 UTC

How to access data folder?

Hi,

How to access/store files data folder of karaf?

*Clement Jebakumar,*
111/27 Keelamutharamman Kovil Street,
Tenkasi, 627 811
http://www.declum.com/clement.html

Re: How to access data folder?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Clément,

data folder is used internally by the OSGi framework and Karaf.

You are not supposed to need access to the data folder (at least not 
directly).

Why do you want to do ?

Regards
JB

On 05/30/2013 06:46 PM, Clement Jebakumar wrote:
>
> Hi,
>
> How to access/store files data folder of karaf?
>
> *Clement Jebakumar,*
> 111/27 Keelamutharamman Kovil Street,
> Tenkasi, 627 811
> http://www.declum.com/clement.html

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

RE: How to access data folder?

Posted by rkmoquin <fr...@gmail.com>.
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.