-
-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Atmosphere&Jersey: method of PerRequestBroadcastFilter is not called #244
Comments
This is not a bug. In your log, you can see
There is no suspended connection/resource, hence the PerRequestBroadcastFilter API will never be invoked as the Broadcaster doesn't have anything to broadcast to. |
So, it means that I cannot do @suspend and @broadcast at the same method? |
You need to make sure the connection is suspended first. Add an AtmosphereResourceEventListener#onSuspend(), and from there use a BroadcasterFactory (or AtmosphereResource#getBroadcaster) to broadcast. |
I think we need to mark this restriction in documentation. |
Agree. Can you file an issue with [javadoc] in the title? Thanks a lot. |
Ok, I will. So I have refactored it to use AtmosphereResourceEventListener. This is current log:
|
Thanks for confirming! Keep up the good work! |
Please see this example.
The issue that Atmosphere calls filter(Object originalMessage, Object message) but doesn't call filter(HttpServletRequest request, HttpServletResponse response, Object message) for both assigned filters (via web.xml and programmatically) Please see log below.
Log from my console:
Please see https://github.com/ekochnev/atmosphere-experiments/tree/master/tictactoe-jersey-4
I use:
Atmosphere 0.8.6
jetty-distribution-8.1.2.v20120308
Firefox 11.0.
No java script issues is found.
The text was updated successfully, but these errors were encountered: