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)
별다른 문서가 없어서리 소스 뒤져보고 영문으로 작성함 -_-;

트랙백

이 글과 관련된 글 쓰기 (트랙백 보내기)
TrackbackURL : http://www.xeraph.com/tb/4922720 [도움말]

덧글

댓글 입력 영역