4 Replies Latest reply on Jun 22, 2011 10:27 AM by donboscosamson

    Getting AJAX push to work (PushEventListener missing)

    jodaha

      Hey!

       

      I want to set up a simple AJAX push example. However, I can't find the class org.ajax4jsf.event.PushEventListener. These are the libs I have included:

       

      richfaces-components-api-4.0.0.Final

      richfaces-components-ui-4.0.0.Final

      richfaces-core-api-4.0.0.Final

      richfaces-core-impl-4.0.0.Final

       

      Is there anything missing? And do I really need them all if I only want to use the push feature?

       

      Will RichFaces and the Push feature work with MyFaces and Tomahawk running on a Tomcat?

       

      Thanks!

        • 1. Re: Getting AJAX push to work (PushEventListener missing)
          ppitonak

          Hi Jonas,

           

          class PushEventListener doesn't exist any more. Have a look into Component Reference for more details on how to use push in RichFaces 4.

           

          Regards,

          Palo

           

           

          http://docs.jboss.org/richfaces/nightly_4_0_X/Component_Reference/en-US/html_single/#sect-Component_Reference-Actions-a4jpush

          • 2. Re: Getting AJAX push to work (PushEventListener missing)
            jodaha

            Thanks for clearing that up, Palo. Looks rather complicated though!

            • 3. Re: Getting AJAX push to work (PushEventListener missing)
              ppitonak

              You can read Ilya's blog about Push http://in.relation.to/Bloggers/GettingStartedWithRichFaces40Push. Maybe it will help you.

              • 4. Re: Getting AJAX push to work (PushEventListener missing)
                donboscosamson

                Richfaces 4 push on Jboss 4.2.1

                 

                 

                I am trying to implement Richfaces push on Jboss 4.2.1.

                 

                I am able to run the expample irc-client in Jboss 6.

                 

                However i was trying to do the same in Jboss 4 it wasn't working.

                 

                Here is my MBean Setup

                 

                 

                <mbean code="org.jboss.mq.server.jmx.Topic"

                           name="jboss.mq.destination:service=Topic,name=chat">

                     <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>

                           <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>

                           <attribute name="SecurityConf">

                                      <security>

                                              <role name="guest" read="true" write="true" create="true" delete="true"/>

                                      </security>

                                    </attribute>

                   </mbean>

                 

                I see that the Chat application is able to publish the Message to the topic.  If i write seperate subscriber to topic i could see the messaes are comming in.

                 

                The main difference i noticed was the Atmosphere environment was not stated in JBoss 4.2.1.

                 

                In Jboss 6 i see the following log

                2011-06-21 12:45:00,281 INFO  [Atmosphere] (HDScanner) Atmosphere using Broadcaster org.atmosphere.cpr.DefaultBroadcaster

                2011-06-21 12:45:00,282 INFO  [Atmosphere] (HDScanner) Atmosphere is using for CometSupport: org.atmosphere.container.Servlet30Support running under container JBoss Web/3.0.0-CR1 using javax.servlet/3.0

                2011-06-21 12:45:00,283 INFO  [Atmosphere] (HDScanner) Using org.atmosphere.cpr.DefaultBroadcaster

                2011-06-21 12:45:00,284 INFO  [Atmosphere] (HDScanner) Atmosphere Framework 0.6.5 started.

                 

                i don't this initialization in Jboss 4.2.1

                 

                If I manually need to initialize, what is the setup to configure atmosphere for Richfaces?