I am trying to store a user as an ASO. I am able to set the user, but when I
want to log out, I figured the right way to do it was to just set the user
ASO to null. I believe this works fine, just that now when I chcek to see if
the user is null or not, as expected, the application state manager will
attempt to create a new instance of it. I figured this wouldn't be a
problem, since I could just override the configuration to have something
like:
public void contributeApplicationStateManager(MappedConfiguration<Class,
ApplicationStateContribution> configuration)
   {
ApplicationStateCreator<User> creator = new ApplicationStateCreator<User>()
     {
       public User create()
       {
         return null;
       }
     };

     configuration.add(User.class, new
ApplicationStateContribution("session", creator));
}

however this didn't seem to make any difference. I still get a
java.lang.InstantiationException. Is there something I am missing?

--
Peter Beshai

Pure Mathematics/Computer Science Student
University of Waterloo

Reply via email to