use of org.apache.felix.cm.impl.persistence.PersistenceManagerTracker in project felix by apache.
the class Activator method start.
@Override
public void start(final BundleContext bundleContext) throws BundleException {
// setup log
Log.logger.start(bundleContext);
// register default file persistence manager
final PersistenceManager defaultPM = this.registerFilePersistenceManager(bundleContext);
if (defaultPM == null) {
throw new BundleException("Unable to register default persistence manager.");
}
String configuredPM = bundleContext.getProperty(CM_CONFIG_PM);
if (configuredPM != null && configuredPM.isEmpty()) {
configuredPM = null;
}
try {
this.tracker = new PersistenceManagerTracker(bundleContext, defaultPM, configuredPM);
} catch (InvalidSyntaxException iae) {
Log.logger.log(LogService.LOG_ERROR, "Cannot create the persistence manager tracker", iae);
throw new BundleException(iae.getMessage(), iae);
}
}
Aggregations