I'm not sure if this is because of the GWT plugin, but maybe you guys
know...
I have a Singleton class which I use to store the user authentication.
But When I reload my page (with F5) the singleton is reloaded, as if
the VM is restarted.
public class AuthenticationManager {
private static final AuthenticationManager m_instance = new
AuthenticationManager();
private boolean m_authenticated = false;
private AuthenticationManager() {
System.out.println("AuthenticationManager Constructor");
}
public static AuthenticationManager getInstance() {
return m_instance;
}
public boolean isAuthenticated() {
return m_authenticated;
}
public boolean authenticate(String uid, String pwd) {
if (uid != null && uid.trim().length() > 0) {
if (pwd != null && pwd.trim().length() > 0) {
return (m_authenticated = true);
}
}
return false;
}
}
--
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.