Highlighted

MessageBroker.getMessageBroker(null) returns null.. why?

Avatar

Avatar

RupakKhurana

Avatar

RupakKhurana

RupakKhurana

30-11-2011

Hello

I have seen lot of posts regarding this but no clear reason why this would happen. My server runs under Tomcat 6.0.33. In a spearate thread, I try to get MessageBroker msgBroker = MessageBroker.getMessageBroker(null); but it always returns null. In my web.xml, there is a valid servlet MessageBrokerServlet with load-on-startup = 1. In one of the posts Rohit suggested copy jta.jar to tomcat libs but it doesnot help either. I tried to wait 30 secs or so in my thread before invoking MessageBroker.getMessageBroker(null) and also tried to set param-name messageBrokerId in web.xml, but none seems to help.. please help...

Also tried MessageBroker broker = FlexContext.getMessageBroker() in the init() of my Servlet but it is also null.

thanks

Rupak

Message was edited by: RupakKhurana

Replies

Highlighted

Avatar

Avatar

RupakKhurana

Avatar

RupakKhurana

RupakKhurana

30-11-2011

It is resolved now. Upon careful examination of the log, I found that the MessageBrokerServlet was indeed throwing an exception due to a wrong tag being used in messaging-config.xml file..

Highlighted

Avatar

Avatar

Rohit___Kumar

Employee

Avatar

Rohit___Kumar

Employee

Rohit___Kumar
Employee

01-12-2011

Copying jta.jar to tomcat libs, was for a manifestion of a different problem. In any case, as you answered yourself, you are all set now.