fixes #2614

added hasEventRegistration() method to EventService and MapEventPublisher.
enhanced run() and afterRun() methods.
Also I think you can optimize this method to avoid collection creation..