Discussion:
[errai-users] HttpSession Question
Charles Picard
2010-08-17 05:01:33 UTC
Permalink
*Mike Brock* cbrock at redhat.com
<errai-users%40lists.jboss.org?Subject=Re:%20%5Berrai-users%5D%20Get%20HttpSession&In-Reply-To=%3CD57AF496-C271-4CAD-8626-8CE1BD4867DC%40redhat.com%3E>
*Fri Jun 4 12:09:32 EDT 2010*
The best thing to do at this point would be to write your own SessionProvider implementation that exposes the HttpSession. You can do this by implementing SessionProvider, and specifying the implementation in your ErraiService.properties with: errai.session_provider_implementation=org.foo.MySessionProvider
The session provider will be passed the HttpSession as the first parameter or getSession();
You should look at the existing HttpSessionProvider implementation.
Mike,

Can you elaborate a little? I implemented my own version of
HttpSessionProvider by copying this file into my project and exposing the
HttpSession as a getter.

I'm unclear on how to get a reference to that from an arbitrary Errai
@Service class that implements MessageCallback. Any thoughts?

Thanks,
Charles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/errai-users/attachments/20100817/46f8ca3c/attachment.html
Loading...