[ 
https://issues.apache.org/jira/browse/FELIX-754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard S. Hall closed FELIX-754.
---------------------------------

    Resolution: Fixed

I removed the profile concept from Felix' bundle cache. Felix will now, by 
default, create a "felix-cache" directory in the current working directory when 
started, which typically will be in the install directory.

The standard Felix launcher was modified to no longer be interactive, so when 
you launch Felix it will just create the default cache directory and start. 
Additionally, the launcher now accepts a single parameter, which is a directory 
to use for the bundle cache. For example:

    java -jar bin/felix.jar /path/to/cache

Will use "/path/to/cache" as the bundle cache directory; if it does not exist 
it will be created. If you specify a relative path, such as:

    java -jar bin/felix.jar cache

It will be relative to the current working directory and will be created if it 
does not exist. Thus, the above command would start Felix using "./cache" 
instead of the default "./felix-cache" as its bundle cache. Instead of passing 
the bundle cache on the command line, you may also specify it as a property:

    org.osgi.framework.storage=/path/to/cache

The result here will be the same as above if it were typed on the command line 
as an argument to the launcher. To make this even more flexible, another 
configuration property is available to control how relative paths get converted 
to absolute paths, for example:

    felix.cache.rootdir=/path/to/

If the property were set to this value in conf/config.properties and Felix were 
started like this:

    java -jar bin/felix.jar cache

Then the resulting bundle cache would be "/path/to/cache". More precisely, the 
bundle cache directory is calculated as ${felix.cache.rootdir} + 
${org.osgi.framework.storage} if and only if the value of 
org.osgi.framework.storage is relative; if it is absolute, then its value is 
used as is.

The interesting thing about this approach is that it can be used to easily 
mimic the profile-based approach of the previous version of Felix. For example, 
if you modify conf/config.properties to have the following property value:

    felix.cache.rootdir=${user.home}/.felix/

Then starting Felix with any relative command line argument will be relative to 
the old Felix profile directory, so you can easily use existing profiles and 
create new ones.



> Remove bundle cache profiles concept
> ------------------------------------
>
>                 Key: FELIX-754
>                 URL: https://issues.apache.org/jira/browse/FELIX-754
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.2.1

>            Reporter: Richard S. Hall
>            Assignee: Richard S. Hall
>             Fix For: felix-1.2.2
>
>
> Since the beginning of time, Oscar/Felix has supported the bundle cache 
> profile concept, whose main purpose was to allow you to easily create sets of 
> cached bundles for different purposes. This concept has always been a little 
> confusing for new users. We should remove this concept and just replace it 
> with a reasonable default, like creating a cache directory in the current 
> directory. Since most people run Felix from the install directory, this means 
> that for most people it will just use a directory inside the install 
> directory.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to