// 1) the service was matching and does not match anymore -> it's a departure.
// 2) the service was not matching and matches -> it's an arrival
// 3) the service was matching and still matches -> it's a modification.
// The dependency event to send
DependencyEventType eventType = null;
ServiceReference<?> eventRef = null;
try {
m_dependency.acquireWriteLockIfNotHeld();