if (event.getFactoryPid() != null) {
properties.put(CM_FACTORY_PID, event.getFactoryPid());
}
putServiceReferenceProperties(properties, ref);
Event convertedEvent = new Event(topic, (Dictionary) properties);
eventAdmin.postEvent(convertedEvent);
}
public void putServiceReferenceProperties(Hashtable properties, ServiceReference ref) {
properties.put(SERVICE, ref);
properties.put(SERVICE_ID, ref.getProperty(org.osgi.framework.Constants.SERVICE_ID));