We are using PrimeFaces 5.1 with Atmosphere 2.2.6 and it works great.
However, we are using Apache Shiro for securing the web app, and we want to access the Shiro Subject from inside a @PushEndPoint class.
Atmosphere has a built-in interceptor called ShiroInterceptor, that can inject the Shiro subject as an attribute of the AtmosphereResource for each request.
This is configured in the web.xml as follows:
Code: Select all
<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>
<init-param>
<param-name>org.atmosphere.cpr.AtmosphereInterceptor</param-name>
<param-value>org.atmosphere.interceptor.ShiroInterceptor</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
</servlet>
In the below link there is some clue:
https://jfarcand.wordpress.com/2011/07/ ... comet-app/
But it requires the usage of the @ManagedService and the @Ready annotations from Atmosphere, and we are unsure how to combine this with the @PushEndPoint.
Any help would be greatly appreciated !!
Miguel