Same old session/user management

13 views
Skip to first unread message

Alex Dobjanschi

unread,
Jul 6, 2011, 5:59:41 PM7/6/11
to google-a...@googlegroups.com
Hi guys,
I've iterated over and over through this subject, looking over the messages in this thread and, through I found some info, those were not enough.

Here's what I try to do -- I want to build a GWT/GAE app that runs on custom user management (not UserService). That is, have some sort of session management on server code/servlet.

I'm trying to find the best/good enough practice to share the currently logged in user among servlets (yes, I need more servlets, for search/creating items/user management).
Right now, upon authentication, user servlet saves the account in a session attribute:

getThreadLocalRequest().getSession().setAttribute(ACCOUNT_ATTRIBUTE, account);


Everything works fine if I access methods on same servlet. But how do I share this user with another servlet (for instance, to create a new item)?

What I've tried is bind the servlet in singleton to a IAccountSessionService that I inject wherever it's needed. I guess it's not very elegant, besides it doesn't even work...
I'm also open to any suggestions on the code structure :)
Thanks
Reply all
Reply to author
Forward
0 new messages