How to embed felix framework 1.6.0

about 1.2.x to 1.6.0 breaking changes.

felix 1.2.x version:
Map configMap = new StringMap(false);
configMap.put(FelixConstants.EMBEDDED_EXECUTION_PROP, "true");
configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES, getSystemPackages());
configMap.put(BundleCache.CACHE_PROFILE_DIR_PROP, "cache");

List activators = new ArrayList();
activators.add(this);

new Felix(configMap, activators).start();

felix 1.6.0 version:

Felix constructor now takes only config map.
If you want to migrate to newer version, change the code like below:
List activators = new ArrayList();
activators.add(this);

Map configMap = new StringMap(false);
configMap.put(FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP, activators);
configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES, getSystemPackages());
configMap.put(Constants.FRAMEWORK_STORAGE, "cache");

new Felix(configMap).start();

Summary:
  • Use FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP (felix.systembundle.activators) instead of  FelixConstants.EMBEDDED_EXECUTION_PROP (felix.embedded.execution)
  • Set BundleActivators through configMap instead of Felix constructor's parameter.
  • Use Constants.FRAMEWORK_STORAGE (org.osgi.framework.storgage) instead of BundleCache.CACHE_PROFILE_DIR_PROP (felix.cache.profiledir)
별다른 문서가 없어서리 소스 뒤져보고 영문으로 작성함 -_-;
by xeraph | 2009/04/22 19:52 | 학술 | 트랙백 | 덧글(0)
트랙백 주소 : http://xeraph.com/tb/4922720
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]

:         :

:

비공개 덧글