vaadin 7.1 push with session scoped beans

I am trying to switch from vaadin 7.1 beta to vaadin 7.1 release, however I encounter an error when using push and session scoped beans. On creating a new instance of a spring bean (via a bean factory), I get the following error:

“Error creating bean with name ‘sessionEventManager’: Scope ‘session’ is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.”

This appears to be related to the push system, as removing the push annotation from the application seems to stop the exception occurring.

Any help is greatly appreciated, would like to move away from the beta as soon as possible!

(stack trace attached)

Cheers,
Michael
13087.txt (7.23 KB)

There seems to be discussion about this in
this thread
.

I believe this is a more general issue - request and session scopes are implemented in Spring using servlet filters or similar solutions that do not get triggered for requests received over the push channel. This is not specific to Vaadin, either, but perhaps a Vaadin add-on could add support for linking push requests to Spring session scope by listening to requests on a higher level in the stack.

Okay.

I’m curious as to why this functionality worked fine in the beta, but not in the stable release?

Are there plans to fix this issue in Vaadin 7.1.1? This would be much preferred to using a 3rd party add-on, especially for such commonly required functionality (at least in my opinion, and given how popular the add-on is).

It seems I also ran into the same issue. Is there any update for the issue?

I am really appreciate your help.

Thanks,
Gil

Hello,

We’ve been using vaadin4spring & push for some time now, and haven’t seem to run into this issue, despite having a few beans annotated @VaadinSessionScope. At least not in the way of compile time or runtime exceptions. Because I saw the warning at the bottom of
this new post
, I decided to research it though.

Has it perhaps been fixed in the meantime?

Thanks,
Jan