On Monday 25 March 2013 00:59:30 Leonid Bogdanov wrote:
> Hello!
> 
>     I'm playing with the "wicket-atmosphere" module and, while generally it
> works fine, I stumbled upon a couple of issues:
> 
>     1) Suppose I have a Page with a method marked with @Subscribe
> annotation, this subscribtion has a filter attached. Is it possible to get
> the Page instance inside the filter to, e.g., access Page instance
> variables when deciding on event filtering?

Filtering is performed outside the scope of the pages. Fetching pages from the 
page store is very expensive, especially if you are going to push events to 
many pages. I suggest you put data you need for filtering in the atmosphere 
resource, which is available in the filter. If that's not possible, you can 
try a contextAwareFilter, but beware of the performance issues.

>     2) It seems like sometimes empty Atmosphere messages are sent to a page
> when a filter rejected the specific message. For such events I have the
> following log record on the server [Atmosphere-AsyncWrite-1] INFO 
> o.a.w.atmosphere.AtmosphereBehavior - onBroadcast: 0<|msg|> and there is a
> JS error in a browser after receiveing the event
>     ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not
> find root <ajax-response> element What is the purpose of sending empty
> messages to a browser?

This seems like a bug. Please file a bug report with a quickstart. You can use 
https://github.com/papegaaij/wicket-atmosphere-quickstart as a starting point.

>     3) In my app Apache Shiro framework is integrated via a plugin adapted
> from "fiftyfive-wicket-shiro" project. User credentials are checked in an
> AJAX login form. In order to prevent a session fixation attack there is a
> call to invalidate old and create new session right before credentials
> check: getSession().replaceSession(); // inside
> AjaxFallbackButton.onSubmit() After integration with Atmosphere this code
> no longer works, an exception in thrown on login attempt:
> 
<cut IllegalStateException in Session>
I'm not sure what happens here. It seems Wicket tries to read an attribute 
from the invalidated session. Does this happen even without a suspended 
connected?

Best regards,
Emond

Reply via email to