1

I found this topic about Felix cache

Disabling Cache in Apache Felix

Can you give me some example how I can use below code because I can't find configurationProperties.

configurationProperties.setProperty(Constants.FRAMEWORK_STORAGE_CLEAN, Constants.FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT);
Community
  • 1
  • 1
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
  • The link you post actually contains the answer to this question. – Marcel Offermans Aug 12 '14 at 18:35
  • I assume that you mean org.osgi.framework.storage.clean? I cannot find it. – Peter Penzov Aug 12 '14 at 18:56
  • Scroll down here http://felix.apache.org/site/apache-felix-framework-bundle-cache.html and also take a look at the document referenced there on how to set these properties: http://felix.apache.org/documentation/subprojects/apache-felix-framework/apache-felix-framework-usage-documentation.html#ApacheFelixFrameworkUsageDocumentation-configuringframework – Marcel Offermans Aug 12 '14 at 19:02
  • Unfortunately I'm new to Java. Can you please show me some basic example how to use it? – Peter Penzov Aug 12 '14 at 19:08

1 Answers1

1

You could use code from this page: How to start and use Apache Felix from code?

In this code configurationProperties is names just map.

Map<String, Object> map = new HashMap<String, Object>();
map.put(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA,
    "some.module.i.dont.know; version=1.0.0");

You could set your property:

map.setProperty(Constants.FRAMEWORK_STORAGE_CLEAN, Constants.FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT);
Community
  • 1
  • 1
Alien11689
  • 461
  • 4
  • 5