@Activate protected void activate(final BundleContext bundleContext, Map<String, Object> properties) { _logger = new Logger(bundleContext); DB db = DBManagerUtil.getDB(); ServiceTrackerMapListener<String, UpgradeInfo, List<UpgradeInfo>> serviceTrackerMapListener = null; _releaseManagerConfiguration = ConfigurableUtil.createConfigurable(ReleaseManagerConfiguration.class, properties); if (_releaseManagerConfiguration.autoUpgrade()) { serviceTrackerMapListener = new UpgradeInfoServiceTrackerMapListener(); } _serviceTrackerMap = ServiceTrackerMapFactory.openMultiValueMap( bundleContext, UpgradeStep.class, "(&(upgrade.bundle.symbolic.name=*)(|(upgrade.db.type=any)" + "(upgrade.db.type=" + db.getDBType() + ")))", new PropertyServiceReferenceMapper<String, UpgradeStep>("upgrade.bundle.symbolic.name"), new UpgradeServiceTrackerCustomizer(bundleContext), Collections.reverseOrder( new PropertyServiceReferenceComparator<UpgradeStep>("upgrade.from.schema.version")), serviceTrackerMapListener); }
@Activate @Modified protected void activate(Map<String, Object> properties) { _monitoringConfiguration = ConfigurableUtil.createConfigurable(MonitoringConfiguration.class, properties); setMonitorPortalRequest(_monitoringConfiguration.monitorPortalRequest()); setMonitorPortletActionRequest(_monitoringConfiguration.monitorPortletActionRequest()); setMonitorPortletEventRequest(_monitoringConfiguration.monitorPortletEventRequest()); setMonitorPortletRenderRequest(_monitoringConfiguration.monitorPortletRenderRequest()); setMonitorPortletResourceRequest(_monitoringConfiguration.monitorPortletResourceRequest()); setMonitorServiceRequest(_monitoringConfiguration.monitorServiceRequest()); }