I have a bootstrapper that handles sessionDestroyed, sessionCreated, ClientCreated, ClientDestroyed, MessageClientDestroyed, MessageClientCreated events.
My aim is to send a disconnect message to all clients or all subscribed destinations.
So i need a push mechanism inside the service. I have tried to get messageService and MessageBroker but i got exception.
I have tried messageBroker.routeMessageToService(msg,null);
and messageService.pushMessageToClients(msg,true); both is unsuccessful because i could not get messageService and messageBroker.
How can i get MessageBroker or MessageService in service clientDestroyed event.
this is my working code hope it helps to somebody.