Multiple Connections Over One Socket

UI Components for JSF
ShawShankHoo
Posts: 7
Joined: 06 Aug 2015, 23:08

10 Aug 2015, 16:45

Correct...

Code: Select all

<p:socket onMessage="handleMessage" channel="/notifyMsg/#{userInfo.agent.userName}"/>

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

10 Aug 2015, 16:56

What happens when you have the following (and why cannot the following meet your business requirements) ?

Code: Select all

eventBus.publish("/" + user.getUserName(), msg);

Code: Select all

@PushEndpoint("/{userName}")

Code: Select all

<p:socket onMessage="handleMessage" channel="/#{userInfo.agent.userName}"/>
It may be time to take a look at the atmosphere framework WIKI and/or post your question on the atmosphere framework google groups mail list.

After you have the solution or a workaround, please reply here. Thanks. :)
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

ShawShankHoo
Posts: 7
Joined: 06 Aug 2015, 23:08

10 Aug 2015, 17:40

We tried that format, but it still does not work. The problem is that the PrimeFaces @PushEndpoint annotation does not properly handle parameters (or the underlying Atmosphere API is not properly handling parameters). When hard coding the parameter for the @PushEndpoint annotation and leaving everything else the same then it will work.

We've gone ahead and moved back to Atmosphere 2.3.1 for the time being and this works with PrimeFaces 5.2.9. You are right that this may very well be an Atmosphere specific issue and it may need to be addressed by them.

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

10 Aug 2015, 18:26

Sounds like a bug/defect. Please create an issue on atmosphere framework github, and reply here with issue # and URL.
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

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

10 Aug 2015, 18:32

ShawShankHoo wrote:We've gone ahead and moved back to Atmosphere 2.3.1 for the time being and this works with PrimeFaces 5.2.9. You are right that this may very well be an Atmosphere specific issue and it may need to be addressed by them.
Oh yeah, just remembered, that I tried Atmosphere runtime 2.3.2 and 2.3.3, and there was an issue using those versions with PrimeFaces 5.2(.x), so I informed Jeanfrancois, and he fixed issue in Atmosphere 2.3.4 SNAPSHOT.

I did the same thing, I kept using Atmosphere 2.3.1 until I tried Atmosphere 2.3.4 SNAPSHOT.

Read all of the following from start to finish:

[ANN] Atmosphere 2.3.2 released

[ANN] Atmopshere 2.4.0-RC2 released

[ANN] Atmosphere 2.3.4 released
Last edited by smithh032772 on 17 Aug 2015, 19:56, edited 2 times in total.
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

ShawShankHoo
Posts: 7
Joined: 06 Aug 2015, 23:08

10 Aug 2015, 19:24

Thanks, smithh032772!

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

10 Aug 2015, 20:54

Does Atmosphere runtime 2.3.4 fix your issue?

See my previous response; i edited my previous response and added URL for atmosphere runtime 2.3.4 release.
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

hubshop
Posts: 3
Joined: 31 Jul 2015, 16:03

17 Aug 2015, 18:18

Really, Atmosphere 2.3.4 fix it!

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 64 guests