2 Replies Latest reply on Aug 15, 2013 9:27 AM by nathan dennis

    Richfaces CDI Push Problems

    nathan dennis Expert

      Jboss 7.1.3

      WELD 1.1.10.Final

      Richfaces 4.3.2.final

       

       

       

       

       

      public static final String PUSH_CDI_TOPIC = "pushLocalQueue";
      @Inject
      @Push(topic=PUSH_CDI_TOPIC)
      Event<Encounter> pushEventLocal;
      
      //push producer method
      public void doSomething(){
           pushEventLocal.fire(encounter); //pushes as json
      
      
      
      
      
      }
      
      
      
      ////consumer
      
      <a4j:push address="pushLocalQueue" onerror="alert(event.rf.data)">
                   <a4j:ajax event="dataavailable" render="localQueueEncounters" oncomplete="loadTotal();" />
                  <a4j:ajax event="subscribed" render="localQueueEncounters" />
       </a4j:push>
      

       

       

      problems I'm seeing are

      1. the timeout on the request refresh is much longer that in the show case.

      2. after 5 minutes the request times out and fails with an Aborted or Canceled (i believe from my debugging a 400 instead of a 200OK)

       

      in firefox it seems to be ok with this. it will resubscribe successfully and wait. on event it pushes as expected.

      in chrome (at least the version im running 25) it will get hung in a loop and every 8 ms it will send out a resubscribe request that finishes with a 200OK

       

      those request go something like w

      Request URL:http://cc.monarchnc.org/__richfaces_push?__richfacesPushAsync=1&pushSessionId=0d053d9b-1dfa-4510-868c-5486317ab95a&X-Atmosphere-tracking-id=3d06250c-381e-416d-b4bc-3bee1cfed4b7&X-Atmosphere-Framework=1.0.10&X-Atmosphere-Transport=long-polling&X-Cache-Date=0&_=1372889032417
      Request Method:GET
      Status Code:200 OK
      Request Headersview sourceAccept:*/*
      Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
      Accept-Encoding:gzip,deflate,sdch
      Accept-Language:en-US,en;q=0.8
      Connection:keep-alive
      Cookie:JSESSIONID=jXwcoYbfRaSApZV5rKIqWnKR; org.monarchnc.commandcenter.location=1; org.monarchnc.commandcenter.security=MjFmM2MxOTlhMzdlYWY1NDJmYzdjNTIwNmRiN2Y1NDU_; csfcfc=_11Xfr
      Host:cc.monarchnc.org
      Referer:http://cc.monarchnc.org/pages/local/queue.xhtml?dsRid=199&windowId=-8827
      User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22
      
      
      Query String Parametersview sourceview URL encoded__richfacesPushAsync:1
      pushSessionId:0d053d9b-1dfa-4510-868c-5486317ab95a
      X-Atmosphere-tracking-id:3d06250c-381e-416d-b4bc-3bee1cfed4b7
      X-Atmosphere-Framework:1.0.10
      X-Atmosphere-Transport:long-polling
      X-Cache-Date:0
      _:1372889032417
      
      
      Response Headersview sourceAccess-Control-Allow-Credentials:true
      Access-Control-Allow-Origin:*
      Cache-Control:no-store, no-cache, must-revalidate
      Connection:close
      Content-Length:0
      Content-Type:text/plain; charset=UTF-8
      Date:Wed, 03 Jul 2013 22:03:52 GMT
      Expires:-1
      Pragma:no-cache
      Server:Apache/2.2.15 (CentOS)
      X-Atmosphere-tracking-id:3d06250c-381e-416d-b4bc-3bee1cfed4b7
      
      
      
      

       

       

      not really sure where im going wrong here. if anyone has any ideas they would be muchly appreciated.

       

       





      ;