Push does not working on Wildfly 8.2.1.Final

UI Components for JSF
Post Reply
trublu
Posts: 1
Joined: 10 Nov 2014, 16:22

15 Aug 2015, 17:05

Hello,

i hope somebody can help me. The push function does not working on Wildfly 8.2.1.Final. All seems ok, but i don't see the notification when i click on my button. Here are my configuration. I have no idea, what i make wrong.

web.xml

Code: Select all

	<servlet>
		<servlet-name>Push Servlet</servlet-name>
		<servlet-class>org.primefaces.push.PushServlet</servlet-class>
		<async-supported>true</async-supported>
	</servlet>

	<servlet-mapping>
		<servlet-name>Push Servlet</servlet-name>
		<url-pattern>/primepush/*</url-pattern>
	</servlet-mapping>
pom.xml

Code: Select all

        <dependency>
        	<groupId>org.primefaces</groupId>
        	<artifactId>primefaces</artifactId>
        	<version>5.1</version>
        </dependency>
        
        <dependency>
        	<groupId>org.atmosphere</groupId>
        	<artifactId>atmosphere-runtime</artifactId>
        	<version>2.3.4</version>
        </dependency>
Java-Class

Code: Select all

import javax.faces.application.FacesMessage;

import org.primefaces.push.EventBus;
import org.primefaces.push.RemoteEndpoint;
import org.primefaces.push.annotation.OnClose;
import org.primefaces.push.annotation.OnMessage;
import org.primefaces.push.annotation.OnOpen;
import org.primefaces.push.annotation.PushEndpoint;
import org.primefaces.push.impl.JSONEncoder;

@PushEndpoint("/pushNode")
public class PushNode {
	
	@OnMessage(encoders = {JSONEncoder.class})
    public FacesMessage onMessage(FacesMessage message) {
        return message;
    }
	
	@OnOpen
    public void onOpen(RemoteEndpoint r, EventBus eventBus) {
    }
 
    @OnClose
    public void onClose(RemoteEndpoint r, EventBus eventBus) {
    }
		
}
.xhtml

Code: Select all

<p:socket onMessage="handleMessage" channel="/pushNode" />
<script type="text/javascript">
        function handleMessage(facesmessage) {
            facesmessage.severity = 'info';
 
            PF('growl').show([facesmessage]);
        }
</script>
I found in my Server-Log a warning. Is this my problem?

Code: Select all

16:55:55,185 WARN  [org.atmosphere.cpr.AtmosphereFramework] (default task-3) No BroadcasterCache configured. Broadcasted message between client reconnection will be LOST. It is recommended to configure the org.atmosphere.cache.UUIDBroadcasterCache

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

17 Aug 2015, 20:09

Read this, do everything mentioned-and-recommended there, and use PrimeFaces 5.2 with Atmosphere 2.3.4.
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 46 guests