GWT : NULL Session
- by jidma
I'm using spring4gwt in my project.
I have the following login service implementation:
@Service("loginService")
public class LoginServiceImpl extends RemoteServiceServlet implements LoginService {
@Override
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public UserBean checkUser(String userName, String password) throws Exception {
HttpSession httpSession = getThreadLocalRequest().getSession();
}
}
When i call the loginService.checkUser("test","test") (In hosted mode), I get a null pointer exception, as getThreadLocalRequest() returns NULL instead of the actual session.
I didn't try in web mode yet.
Why would I get a null session ? Does it have something to do with spring4gwt ?
Thank you