I am calling a remote service that extends HibernateRemoteService
which of course extends RemoteServiceServlet. When my service is
invoked and I try to get the current user session,
getThreadLocalResponse() always returns null. Has anyone else
experienced this issue? I found the following thread but it is from
last year and it no longer seems relevant since both Hibernate4GWT and
gwt-sl have evolved significantly since November.
Thanks for any help.
Casey
Can you send a snipset of code ?
I don't know if GWT-SL uses the current local thread, but
hibernate4gwt does (to store the HTTP session in the current local
thread).
Regards
Bruno
On 7 oct, 04:18, "j.casey.one...@gmail.com" <j.casey.one...@gmail.com>
wrote:
> First, here is my setup: hibernate4gwt, gwt-sl 0.1.4, gwt 1.4.60, osx.
>
> I am calling a remote service that extends HibernateRemoteService
> which of course extends RemoteServiceServlet. When my service is
> invoked and I try to get the current user session,
> getThreadLocalResponse() always returns null. Has anyone else
> experienced this issue? I found the following thread but it is from
> last year and it no longer seems relevant since both Hibernate4GWT and
> gwt-sl have evolved significantly since November.
>
> http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
public class LoginServiceImpl extends HibernateRemoteService
implements LoginService
private static final long serialVersionUID = -6167290614292255786L;
private AuthenticationService authenticationService;
public LoginServiceImpl ()
{
}
public boolean login(String username, String password) {
if(StringUtils.isEmpty(username) || StringUtils.isEmpty(password))
return false;
//try to read the session ID. This fails.
Long sessionId = getThreadLocalRequest().getSession().getId();
return getAuthenticationService().loginUser(username, password);
}
/**
* Spring Bean
*/
public AuthenticationService getAuthenticationService() {
return authenticationService;
}
public void setAuthenticationService(
AuthenticationService authenticationService) {
this.authenticationService = authenticationService;
To check if I am right, you can try to bypass the GWT-SL redirection
servlet by calling directly your LoginService (in the gwt.xml file).
Regards
Bruno
On 7 oct, 17:18, "j.casey.one...@gmail.com" <j.casey.one...@gmail.com>
wrote:
On Oct 8, 3:49 am, George Georgovassilis <g.georgovassi...@gmail.com>
wrote:
On Nov 14, 9:37 pm, AB <abere...@drillinginfo.com> wrote:
> Any resolution on this. I suspect it is related tohttp://groups.google.com/group/Google-Web-Toolkit/msg/d34fbd167b0fe024