PDA

View Full Version : HELP~~! MessageBroker returning null..



Frank learning Spring
Sep 15th, 2009, 02:31 AM
MessageBroker.getMessageBroker(null) returns a null. Hence i cannot perform messaging services.

yes, i have the correct configuration. i have used congraet's testdrive and set the message broker using


<flex:message-broker>
<flex:message-service
default-channels="my-polling-amf" />
<flex:secured />
</flex:message-broker>

I have tried "FlexContext.getMessageBroker()" and this also returns a null too.

I am using the AsyncMessage, MessageBroker, to send the message because i have headers (subtopics) defined. Otherwise if i use MessageTemplate it works fine.

I am running the integration in JBoss. Everything else works fine except for this messaging nuisance.

I know through Googling that a lot of ppl encountered similar problems but i am yet to find a solution to this.

jeremyg484
Sep 25th, 2009, 12:40 PM
The best approach is to not rely on MessageBroker.getMessageBroker at all. Use Spring to inject the Spring-managed MessageBroker instead.

jbrychka
May 11th, 2012, 10:40 AM
The best approach is to not rely on MessageBroker.getMessageBroker at all. Use Spring to inject the Spring-managed MessageBroker instead.

I am having the same issue since integrating the MessageBroker with Spring. Do you have an example that does the same thing as MessageBroker.getMessageBroker?