4 Replies Latest reply on Nov 28, 2010 11:45 PM by nico4280

    Data push in flex

    aruvasavi Level 1

      Hi

       

      I am working on data push in flex!

      I am using consumer component in flex to subscribe to server to receive the data push by it!

      Data push is happening for sometime and when I switch to other browsers and come back consumer is not listening to the data sent by server but I can see the logs in the server. let me know any poitnters regarding this?

       

      Find the piece of code below...

      <mx:Consumer

       

       

      id="cameraControlConsumer" destination="deviceDataFeeder"

      message="messageHandlerForCameraControl(event)" fault="faultHandler(event)"

      />

       

      private

       

       

      function faultHandler(event:MessageFaultEvent):

      void

      {

      Alert.show(event.message.faultString);

      }

       

       

      private function messageHandlerForCameraControl(event:MessageEvent):void {

       

      var msgSender:String = event.message.headers["USR_LOGIN_ID"].toString();

       

      if (msgSender == myModel.loginUserId.toString()) {

      tempObj =

      new ObjectMap(event.message.body as Object);

      tempMap = tempObj.getHashMap();

       

      if (null != tempMap) {

       

      var tempVar:String = tempMap.getValue("vmsDeviceId");

       

      if(tempVar != null) {

      selectedCameraId = tempVar;

      }

      else {

      selectedCameraId =

      null;

      }

       

      if (1 != getStatus(selectedCameraId)&& selectedCameraId != null)

       

      {

      disableCameraControl(

      false);

      tempVar = tempMap.getValue(

      "MdviZoomMax");

       

      if(tempVar != null)

      {

      maximumZoom = int(tempVar);

      }

      tempVar = tempMap.getValue(

      "MdviZoomMin");

       

      if(tempVar != null)

      {

      minimumZoom = int(tempVar);

      }

       

       

      }

      else {

      disableCameraControl(

      true);

      }

      }

      }

      }

       

       

       

       

       

       

      Thanks and Regards

      Aruna.S.N.

        • 1. Re: Data push in flex
          nico4280

          Hello,

           

          I've got a similar problem.
          Sometime consumer stop listening to the data sent by server. However, I can see data are OK in the "MessageService.pushMessageToClients" function.

           

          Did you find a solution to your problem?

           

          Can anyone help?

           

          Thanks,

          Nicolas

          • 2. Re: Data push in flex
            aruvasavi Level 1

            Hi

             

            Yes the the most bugging problem, took lot of time to debug this.

            check web.xml file in your server, need to set session time out property as below

             

              <!-- Set timeout to 120 minutes -->

                    <session-config>

                            <session-timeout>120</session-timeout>

                    </session-config>

             

             

            Thanks and Regards

            Aruna.S.N

            • 3. Re: Data push in flex
              aruvasavi Level 1

              Hi

               

              Yes the the most bugging problem, took lot of time to debug this.

              check web.xml file in your server, need to set session time out property as below

               

                <!-- Set timeout to 120 minutes -->

                      <session-config>

                              <session-timeout>120</session-timeout>

                      </session-config>

               

               

              Set '-1' for session to be continuous...

               

               

              Thanks and Regards

              Aruna.S.N

              • 4. Re: Data push in flex
                nico4280 Level 1

                I will try this.

                 

                Thanks for responding.

                 

                Nicolas