felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: Disable bundle cache?
Date Sun, 23 Mar 2008 22:34:06 GMT
Tim Moloney wrote:
> Richard S. Hall wrote:
>> Short answer, no. At least not in the sense of truly "disabling the 
>> bundle cache", because the mere fact that you want Felix to remember 
>> that there are bundles in the cache to re-get means that it must be 
>> saving something.
> I may be missing something fundamental in how Felix works, but the 
> point is that I *don't* want Felix to remember that there are bundles 
> in the cache.  During development, I don't want a cache at all.  I 
> can't tell you the number of times I've forgotten to delete the cache 
> so I wasn't running the code I thought I was.

Well, the way Felix works, it uses the cache always, which is what the 
spec says it should do. However, that doesn't mean that we couldn't 
provide such a feature, but you could handle this case very well just by 
creating your own launcher that deletes the cache directory after execution.

We also have an issue that is related to this:


The question on there is whether people just want the cache deleted 
between executions or whether the desire is to eliminate disk usage at 
all. The latter is harder, but not impossible...it would just require 
creating a cache implementation that holds everything in memory (thus 
trading RAM space for disk space).

At any rate, if people simply want the launcher to delete the profile 
directory between executions, then this is simple...so if there is 
enough support for such a feature (i.e., people should make some noise 
on the above JIRA issue), then we could probably add a property to the 
default launcher to do just that. Otherwise, creating a custom launcher 
is not so difficult...the default launcher is intended to be simple and 
NOT intended to do everything for everyone.

>> However, you can install a JAR file into the cache by reference using 
>> a URL like "reference:file:/path/to/jar", but this approach is not 
>> perfect if you have embedded JAR files and/or native code.
> Can you tell me more about this?  Where do I put this URL?

When you install your bundle, instead of using "install 
file:/path/to/jar" use "install reference:file:/path/to/jar".

As Marcel said, this isn't a good long-term approach, but it can 
sometimes be sufficient.

-> richard

> Thanks,
>  Tim
>> -> richard
>> Tim Moloney wrote:
>>> I hope this isn't a silly question but...
>>> Is it possible to disable the bundle cache?  In other words, make 
>>> Felix always get the bundle from the jar file, not from the cache?
>>> I've found the configuration parameters that allow me to change the 
>>> profile directory, and the default profile, but nothing that would 
>>> turn off the cache.
>>> Thanks,
>>>  Tim

View raw message