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 :
Hope this help someone else.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>