[FYI] Atmosphere with Apache shiro

UI Components for JSF
Post Reply
smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

21 Aug 2014, 00:06

Quotes from Atmosphere with Apache shiro
Ahmed Shaheen wrote:I'm trying to use atmosphere via "PrimePush" with Apache Shiro, but I get a strange error message while I'm trying to push a message from server to client.

I've used the Interceptor provided by Atmosphere APIs
https://github.com/Atmosphere/atmospher ... eptor.java

but nothing changed.

here is the Console output for my application server (wildfly 8.1) :

Code: Select all

18:29:08,597 INFO  [org.atmosphere.cpr.AtmosphereFramework] (default task-23) Installed AtmosphereInterceptor @PushEndpoint Interceptor with priority AFTER_DEFAULT 
18:29:08,597 INFO  [org.atmosphere.cpr.AtmosphereFramework] (default task-23) Installed AtmosphereInterceptor com.sh.interceptor.ShiroAtmosphereIntercenptor with priority AFTER_DEFAULT 
18:29:08,607 ERROR [org.atmosphere.cpr.AsynchronousProcessor] (default task-23) Invalid request state. AsyncContext#startAsync not supported. Make sure async-supported is set to true in web.xml
18:29:08,611 ERROR [org.atmosphere.cpr.AsynchronousProcessor] (default task-19) Invalid request state. AsyncContext#startAsync not supported. Make sure async-supported is set to true in web.xml
18:29:08,613 ERROR [org.atmosphere.cpr.AsynchronousProcessor] (default task-24) Invalid request state. AsyncContext#startAsync not supported. Make sure async-supported is set to true in web.xml
18:29:08,616 ERROR [org.atmosphere.cpr.AsynchronousProcessor] (default task-25) Invalid request state. AsyncContext#startAsync not supported. Make sure async-supported is set to true in web.xml
18:29:08,619 ERROR [org.atmosphere.cpr.AsynchronousProcessor] (default task-26) Invalid request state. AsyncContext#startAsync not supported. Make sure async-supported is set to true in web.xml
18:29:08,622 ERROR [org.atmosphere.cpr.AsynchronousProcessor] (default task-27) Invalid request state. AsyncContext#startAsync not supported. Make sure async-supported is set to true in web.xml
18:29:09,286 INFO  [org.atmosphere.cpr.AtmosphereFramework] (Thread-664) Latest version of Atmosphere's JavaScript Client 2.2.2
Ahmed Shaheen wrote:I've found the problem,

No need for the ShiroInterceptor when you work with Long-Pooling you need only to set async to true on the Shirofilter like this :

Code: Select all

 <filter>
        <filter-name>shiroFilter</filter-name>
        <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
        <async-supported>true</async-supported>
 </filter>
Hope this help someone else.
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 37 guests