I'm getting a serialization error when I shutdown Tomcat that has me confused.

java.io.NotSerializableException: 
com.oa.frontoffice.service.AuthenticationService

I experienced quite a bit of this at first before learning that Wicket 
serializes quite heavily, but gained a more thorough understanding of models 
and wrap my business objects in a LoadableDetachableModel like this:

private boolean authenticate() {
                LoadableDetachableModel<AuthenticationService> service = new 
LoadableDetachableModel<AuthenticationService>() {

                                private static final long serialVersionUID = 1L;

                                @Override
                                protected AuthenticationService load() {
                                                return new 
AuthenticationService();
                                }

                };

                authMessage = service.getObject().authenticate(username, 
password);

                if (authMessage != "SUCCESS") {
                                return false;
                }

                return true;
}

Nevertheless, invoking my custom authenticate() method above seems to trigger 
this serialization exception upon shut down and I'm unsure as to why that is.  
The AuthenticationService class itself makes no references to any other classes 
so I don't know the root cause of this issue.  If anyone has any advice on 
where I might need to look, I would greatly appreciate the assistance.

Mike Chandler

Reply via email to