0 Replies Latest reply on Jun 25, 2011 10:04 AM by bcuthb56

    FlexContext null in message broker async




      I have the following class



      public class DownloadService() {
           public DownloadService(MessageTemplate template) {
                this.template = template;
           private void sendAsyncToClient(String msg) {
               FlexSession flexSession = FlexContext.getFlexSession(); 
                          System.out.println("Sednign msg to client "+event+" SessionObject:"+flexSession);
                          this.template.send("feedTopic", event);  


      This class is created using spring with the following bean configs,


      <flex:remoting-destination ref="downloadService" channels="my-streaming-amf,my-longpolling-amf,my-polling-amf"/>
           <bean id="defaultMessageTemplate" class="org.springframework.flex.messaging.MessageTemplate" />


      But when the class attempts to send the message using the template is gets a null pointer on the FlexContext? Can you only using the context on RemoteObjects? with the methods exposed?