@SuppressWarnings("rawtypes") private void updatedSafe(String pid, Dictionary properties) throws Exception { if (!m_decoratorComponent.isActive()) { // Our decorator component has been removed: ignore the configuration update. return; } Component service = m_services.get(pid); if (service == null) { service = createService(new Object[] { properties }); m_services.put(pid, service); m_manager.add(service); } else { updateService(new Object[] { properties, service }); } }
@Override public Object addingService(@SuppressWarnings("rawtypes") ServiceReference reference) { try { ServiceEventImpl event = new ServiceEventImpl(m_component, reference, null); if (obtainServiceBeforeInjecting()) { Object service = event.getEvent(); // will dereference the service object. if (service == null) { // service concurrently removed, ignore return null; } } return event; } catch (IllegalStateException e) { // most likely our bundle is being stopped. Only log an exception if our component is enabled. if (m_component.isActive()) { m_component.getLogger().warn("could not handle service dependency for component %s", e, m_component.getComponentDeclaration().getClassName()); } return null; } }
} catch (IllegalStateException e) { if (m_component.isActive()) { m_component.getLogger().warn("could not handle service dependency for component %s", e, m_component.getComponentDeclaration().getClassName());