Discussion:
[errai-users] Get HttpSession
Henry Molina
2010-06-04 00:49:42 UTC
Permalink
Hi,

I am new to Jboss Errai, I use RPC to invoke services, need to get
HttpSession, as I can do?

Ing. Henry Molina Noboa
Software Engineer
AtikaSoft Software Factory
Phone:(+593-2) 2540-077
Mobile:(+593-9) 6313-994
Email: hmolina at atikasoft.com.ec
Web: http://www.atikasoft.com.ec/
Miembro de Mach?ngaraSoft - Parque Tecnol?gico de Software Quito
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/errai-users/attachments/20100603/2c27be2e/attachment.html
Heiko Braun
2010-06-04 08:13:33 UTC
Permalink
we don't expose the session, but instead you can use SessionContext
to store session state:

SessionContext ctx = SessionContext.get(message)
ctx.setAttribute(a, b);

But be aware that this API is subject to change.

/heiko
Hi,
I am new to Jboss Errai, I use RPC to invoke services, need to get HttpSession, as I can do?
Ing. Henry Molina Noboa
Software Engineer
AtikaSoft Software Factory
Phone:(+593-2) 2540-077
Mobile:(+593-9) 6313-994
Email: hmolina at atikasoft.com.ec
Web: http://www.atikasoft.com.ec/
Miembro de Mach?ngaraSoft - Parque Tecnol?gico de Software Quito
_______________________________________________
errai-users mailing list
errai-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/errai-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/errai-users/attachments/20100604/319a706d/attachment.html
Henry Molina
2010-06-04 14:00:16 UTC
Permalink
thanks, I need to retrieve the ServletContext to integrate with
springframework.

Henry



2010/6/4 Heiko Braun <myownwastebin at googlemail.com>
Post by Heiko Braun
we don't expose the session, but instead you can use SessionContext
SessionContext ctx = SessionContext.get(message)
ctx.setAttribute(a, b);
But be aware that this API is subject to change.
/heiko
Hi,
I am new to Jboss Errai, I use RPC to invoke services, need to get
HttpSession, as I can do?
Ing. Henry Molina Noboa
Software Engineer
AtikaSoft Software Factory
Phone:(+593-2) 2540-077
Mobile:(+593-9) 6313-994
Email: hmolina at atikasoft.com.ec
Web: http://www.atikasoft.com.ec/
Miembro de Mach?ngaraSoft - Parque Tecnol?gico de Software Quito
_______________________________________________
errai-users mailing list
errai-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/errai-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/errai-users/attachments/20100604/cbcf4b1f/attachment.html
Mike Brock
2010-06-04 16:09:32 UTC
Permalink
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.
thanks, I need to retrieve the ServletContext to integrate with springframework.
Henry
2010/6/4 Heiko Braun <myownwastebin at googlemail.com>
we don't expose the session, but instead you can use SessionContext
SessionContext ctx = SessionContext.get(message)
ctx.setAttribute(a, b);
But be aware that this API is subject to change.
/heiko
Hi,
I am new to Jboss Errai, I use RPC to invoke services, need to get HttpSession, as I can do?
Ing. Henry Molina Noboa
Software Engineer
AtikaSoft Software Factory
Phone:(+593-2) 2540-077
Mobile:(+593-9) 6313-994
Email: hmolina at atikasoft.com.ec
Web: http://www.atikasoft.com.ec/
Miembro de Mach?ngaraSoft - Parque Tecnol?gico de Software Quito
_______________________________________________
errai-users mailing list
errai-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/errai-users
_______________________________________________
errai-users mailing list
errai-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/errai-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/errai-users/attachments/20100604/aaa6dea7/attachment.html
Loading...