Is there a possible race here where the transition has already happened before you add the listener? I think so. If so, implementing listenerAdded() and checking the state of the passed in ServiceController will cover that case.