Hi,

I am using MVP architecture in my project. And now i am adding session
management.
What exactly does sessionProvider.get() do:
getSession() or getSession(false).
I do not want to create new session if one does not exist.
Here is my simple  SessionHandler :
public abstract class SessionHandler<RT extends Action<RS>, RS extends
Result> extends BaseHandler<RT, RS> {

protected final Provider<HttpSession> sessionProvider;

@Inject
public SessionHandler(Log logger, Provider<HttpSession> sessionProvider) {
super(logger);
this.sessionProvider = sessionProvider;
}

protected UserSessionData getUserData() {
try {
return (UserSessionData)
sessionProvider.get().getAttribute(UserSessionData.SESSION_ATTRIBUTE);
} catch (final NullPointerException e) {
throw new InternalClaireException(EKeys.NOT_LOGGEDIN);
}
}
}

Regards.

--

You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to