0 Replies Latest reply on May 11, 2017 11:02 AM by jsf learner

    a4j push interval..how to set

    jsf learner Newbie

      the interval attribute of a4j push is not working. the atmosphere implementation is used in the application and the page polls a pushtopic. Issue is the polling becomes incessant and grows when multiple users login.Please advise

       

      1) how to enable the polling to happen only on specified intervals

      2) does a4j pull handle synchronization on its own or has be handled by application code? We could see the polling increases with concurrent users

       

      code below- java

       

      TopicsContext topicsContext = TopicsContext.lookup();

                      TopicKey topicKey= new TopicKey("pushTopicsContext");

                       Topic pushTopic = topicsContext.getOrCreateTopic(topicKey);

                       pushTopic.setMessageDataSerializer(DefaultMessageDataSerializer.instance());               

                       topicsContext.publish(topicKey, "testfromuser");

       

      xhtml 

      <a4j:push address="pushTopicsContext">

          <a4j:ajax event="dataavailable" render="grid" oncomplete="javascript:stoEnd('#{rich:clientId('texta')}');"/>

      </a4j:push>