I couldnt execute push ability

UI Components for JSF
Post Reply
CANULAN
Posts: 7
Joined: 30 Mar 2013, 13:02
Location: istanbul

24 Jul 2014, 13:57

Hi

I try to execute the same example of notify on the demo page (http://www.primefaces.org/showcase/push/notify.xhtml), but I cant executed. There is no any exception but the faces message doesnt trigged. There is no any FacesMessage.

Code: Select all

    public void send() {
        EventBus eventBus = EventBusFactory.getDefault().eventBus();
        System.out.println("summary:" + summary + "|detail:" + detail);
        System.out.println("publishing..."); 
        eventBus.publish(CHANNEL, new FacesMessage(StringEscapeUtils.escapeHtml(summary), StringEscapeUtils.escapeHtml(detail)));
        System.out.println("published successfully...");
    }
output:
summary:aa|detail:ss
publishing...
published successfully...


I work with primefaces-5.0.jar, atmosphere-runtime-2.2.0-RC3.jar

I checked these sites, but cant find any help...
http://atmosphere-framework.2306103.n4. ... 58748.html
http://atmosphere-framework.2306103.n4. ... 50751.html



my web.xml:

Code: Select all

	<servlet>
		<servlet-name>Faces Servlet</servlet-name>
		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>Faces Servlet</servlet-name>
		<url-pattern>/faces/*</url-pattern>
	</servlet-mapping>
	<servlet>
		<servlet-name>Push Servlet</servlet-name>
		<servlet-class>org.primefaces.push.PushServlet</servlet-class>
		<init-param>
			<param-name>org.atmosphere.cpr.broadcasterCacheClass</param-name>
			<param-value>org.atmosphere.cache.UUIDBroadcasterCache</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
		<async-supported>true</async-supported>
	</servlet>
	<servlet-mapping>
		<servlet-name>Push Servlet</servlet-name>
		<url-pattern>/primepush/*</url-pattern>
	</servlet-mapping>
Thanks for you helpings, advices
canulan

PrimeFaces 5.0, Push (Atmosphere 2.1.7)
Tomcat v7.0 (Apache Tomcat/7.0.47)
Hibernate3 | EclipseLink-JPA/ | Chrome | Firefox | FireBug

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

25 Jul 2014, 19:02

any endpoints defined?

CANULAN
Posts: 7
Joined: 30 Mar 2013, 13:02
Location: istanbul

28 Jul 2014, 15:14

thank you for your support...

My endpoint class is this:

Code: Select all

package com.primefaces.examples.notify;

import javax.faces.application.FacesMessage;
import org.primefaces.push.annotation.OnMessage;
import org.primefaces.push.annotation.PushEndpoint;
import org.primefaces.push.impl.JSONEncoder;
 
@PushEndpoint("/notify")
public class NotifyResource {
         
    @OnMessage(encoders = {JSONEncoder.class})
    public FacesMessage onMessage(FacesMessage message) {
    	System.out.println("message(onMessage):" + message);
        return message;
    }
 
}
At the console, there is no any message with "message(onMessage):" (System.out.println("message(onMessage):" + message); row doesnt work)...
canulan

PrimeFaces 5.0, Push (Atmosphere 2.1.7)
Tomcat v7.0 (Apache Tomcat/7.0.47)
Hibernate3 | EclipseLink-JPA/ | Chrome | Firefox | FireBug

CANULAN
Posts: 7
Joined: 30 Mar 2013, 13:02
Location: istanbul

03 Aug 2014, 20:42

I think my jars versions are wrong or some of my jars are missing. But I dont get any exception. Could you please write me working jars list? I tried with "primefaces-5.0.jar, atmosphere-runtime-2.2.0-RC3.jar"

Thanks for your support
canulan

PrimeFaces 5.0, Push (Atmosphere 2.1.7)
Tomcat v7.0 (Apache Tomcat/7.0.47)
Hibernate3 | EclipseLink-JPA/ | Chrome | Firefox | FireBug

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

04 Aug 2014, 16:27

See the docs... it nowhere mentions atmosphere 2.2.0RC3... And check this: http://forum.primefaces.org/viewtopic.php?f=10&t=39125

CANULAN
Posts: 7
Joined: 30 Mar 2013, 13:02
Location: istanbul

27 Aug 2014, 14:11

it says "Atmosphere 2.2.0 has been released" but I couldnt executed with "atmosphere-runtime-2.2.0.jar". it is not working. But when i use "atmosphere-runtime-2.1.7.jar", it works successfully. Maybe "atmosphere-runtime-2.2.0.jar" needs more jars, i dont know.

Thanks a lot for your all support, I appreciate.
canulan

PrimeFaces 5.0, Push (Atmosphere 2.1.7)
Tomcat v7.0 (Apache Tomcat/7.0.47)
Hibernate3 | EclipseLink-JPA/ | Chrome | Firefox | FireBug

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

27 Aug 2014, 16:49

Read the last post in the topic I referred to. It states there 2.2 does not work!

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 31 guests