PrimeFaces PUSH Showcase

UI Components for JSF
User avatar
andyba
Expert Member
Posts: 2473
Joined: 31 Mar 2011, 16:27
Location: Steinfeld, near Bremen/Osnabrück, DE
Contact:

06 Sep 2016, 13:18

Even without the Exceptions I get

Code: Select all

WARN:   WELD-000714: HttpContextLifecycle guard leak detected. The Servlet container is not fully compliant. The value was 1
WARN:   WELD-000715: HttpContextLifecycle guard not set. The Servlet container is not fully compliant.
which means things are broken.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now

User avatar
andyba
Expert Member
Posts: 2473
Joined: 31 Mar 2011, 16:27
Location: Steinfeld, near Bremen/Osnabrück, DE
Contact:

06 Sep 2016, 14:08

Even simply restarting the server with the app deployed doesn't work and yields different results each time.
I am going to have to create a Counter example on its own and see how that does.
I have a feeling I may also have to upgrade to the next Glassfish version.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now

User avatar
andyba
Expert Member
Posts: 2473
Joined: 31 Mar 2011, 16:27
Location: Steinfeld, near Bremen/Osnabrück, DE
Contact:

06 Sep 2016, 18:31

I have deployed to Payara 4.1.1 and made sure that WebSocket support is switched on (it is by default).
Atmosphere is reporting that WebSocket is not supported "Error during WebSocket handshake: Unexpected response code: 501" and falls back to long-polling.
Still nothing works.

I could really do with some help on this rather than supplying my own answers all the time as nothing I can find to do with Atmosphere and PrimeFaces Push or Glassfish/Payara is giving me any helpful information.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

06 Sep 2016, 19:22

i would help but i have no experience regarding atmosphere. I can just apply fixes if you would like to provide some patches/PRs for possible bugs.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

User avatar
andyba
Expert Member
Posts: 2473
Joined: 31 Mar 2011, 16:27
Location: Steinfeld, near Bremen/Osnabrück, DE
Contact:

07 Sep 2016, 09:37

tandraschko wrote:i would help but i have no experience regarding atmosphere. I can just apply fixes if you would like to provide some patches/PRs for possible bugs.
If I find the time for it, I would. Unfortunately I have more than enough to do keeping the project I am paid to for above water.
If I do find something I will certainly start and issue.

At the moment, running with Payara, the publish and @PushEndpoint classes are working however that is all that is happening. Chrome falls back to long-polling even though the server supports WebSocket.

I am going to put the PUSH issues on the back burner but start an investigation using a simple PUSH app using server generated messages pushed to the client (which is what we use PUSH for).
That way I can avoid issues that may be caused by other parts of the migrated application.

On a side note: PUSH has been the only issue that caused me any problems when migrating our webapp from 4.0.8 to 6.0, apart from a few minor CSS issues to do with our custom Theme the migration was easy.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now

User avatar
andyba
Expert Member
Posts: 2473
Joined: 31 Mar 2011, 16:27
Location: Steinfeld, near Bremen/Osnabrück, DE
Contact:

07 Sep 2016, 16:30

There is a @ServerEndpoint("/*") which appears to swallow all the WebSocket sessions but doesn't manage them very well, this means that you get intermittent connections for a given path back to the client.

As a quick exercise I decided to implement a native WebSocket demo using my simple PrimeFaces test, pretty much going back to basics and no longer using the Atmosphere dependency.

Everything worked!

This means that there are some serious deficiencies in the Atmosphere runtime that need to be addressed.

- It does not recognise that native WebSocket is supported even when it is on Payara 4.1.1 or Glassfish 4.1
- Atmosphere is not doing a very good job of associating sessions to paths.
- these problems are intermittent with some chance of things working as expected but a much greater chance of them not working at all, for no apparent reason.

For me the path of least resistance lies in developing a native WebSocket client that covers our needs

- Server PUSH only, no messages received from the browser
- We only support 1 browser: Chrome and this supports native WebSockets off the bat. In reality FireFox and Edge support native WebSocket too but we only guarantee operation in Chrome.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now

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

07 Sep 2016, 20:30

Andy, I read your posts, and all I have to say is the following:

1. I have only used the Notify example in the PrimeFaces Push showcase in my app, which is a server-to-client push example
2. When I migrated from PrimeFaces 4.0 to 5.0 to 6.0, I had to make several changes in the .java classes only because of Atmosphere API changes
3. when I used Glassfish 3.x in the past, I migrated to TomEE, and ever since, PrimeFaces Push (and Atmosphere) works in my app, as/since I require Google Chrome browser, even though I have a few Apple Safari endusers (iPad and iPhone users).
4. When Jeanfrancois stopped working on Atmosphere, I stopped upgrading Atmosphere, and PrimeFaces Push is still working well in my app.

My signature tells it all, what versions I am using. :)
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

User avatar
andyba
Expert Member
Posts: 2473
Joined: 31 Mar 2011, 16:27
Location: Steinfeld, near Bremen/Osnabrück, DE
Contact:

09 Sep 2016, 13:55

smithh032772 wrote:Andy, I read your posts, and all I have to say is the following:

1. I have only used the Notify example in the PrimeFaces Push showcase in my app, which is a server-to-client push example
2. When I migrated from PrimeFaces 4.0 to 5.0 to 6.0, I had to make several changes in the .java classes only because of Atmosphere API changes
3. when I used Glassfish 3.x in the past, I migrated to TomEE, and ever since, PrimeFaces Push (and Atmosphere) works in my app, as/since I require Google Chrome browser, even though I have a few Apple Safari endusers (iPad and iPhone users).
4. When Jeanfrancois stopped working on Atmosphere, I stopped upgrading Atmosphere, and PrimeFaces Push is still working well in my app.

My signature tells it all, what versions I am using. :)
TomEE is not an option for this project, we do things that use a lot of things that Glassfish does to support java EE apps out of the box.
Hence the move to Payara (the latest GF version is ropy to say the least).
We also have to support mobile devices in the future which is why I have been asked to invest time in migrating our current 4.08 supported version to PF 6.0.
I have managed to replace the entire PrimeFaces PUSH (and atmosphere) with the native WebSockets library of my own development in less than 2 days.
It only supports native WebSockets (we only support browsers that have native WebSockets anyway), has full client/server push functionality with dynamic channels and parameter passing.
Because: I R good at this.

Oh and the migration has now been completed with a version being delivered to our QM chappies in the near future. Apart from PUSH it was a painless experience.
Now looking forward to stuffing our UI into a Premium Ultima theme!
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now

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

09 Sep 2016, 21:38

Congrats, Andy, on the success! I am looking forward to migrating to one of the new responsive PrimeFaces themes as well, so I don't have to do as much client-side coding (via PrimeFaces Mobile JSF xhtml). Premium Ultima theme would be my choice/preference as well.
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 20 guests