fixes #2614

added hasEventRegistration() method to EventService and MapEventPublisher.
enhanced run() and afterRun() methods.