can primefaces push send delay?

UI Components for JSF
Post Reply
bacon88
Posts: 67
Joined: 29 Aug 2012, 08:36
Location: SiChuang,China

11 Nov 2014, 08:56

I have used Primefaces 5.1 and Atmosphere 2.2.2

could the PUSH Delay to wait in milliseconds before sending?

example,think i have two users, one first click the send commandButton,then just , the other one click the send button in another Browser after 2 seconds.if i set the delay value is 5 seconds, the user can see the message in 5 seconds interval.

how can i do it?please help me
jdk1.8.0_202 & Java EE 8
primefaces 8.0
Mojarra 2.3.9
GlassFish Server 5.1.0

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

12 Nov 2014, 22:10

sounds like you rather have p:poll instead of p:socket.

I am currently using the PrimeFaces Push 'notify' (showcase) example (or use case). Prior to using PrimeFaces Push (FacesMessage or Notify), I added messages in a List<> for each user, and I used p:poll to check if there were notifications/messages for each user.

maybe you should try p:poll instead of p:socket for your use case.


also, you can search google for

atmosphere framework wiki

and read atmosphere framework documentation/wiki. You may find a way to delay messages.

OR, you can use Java EE @Asynchronous or JMS.
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

bacon88
Posts: 67
Joined: 29 Aug 2012, 08:36
Location: SiChuang,China

13 Nov 2014, 10:36

thanks i will try it later
jdk1.8.0_202 & Java EE 8
primefaces 8.0
Mojarra 2.3.9
GlassFish Server 5.1.0

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 32 guests