setAttribute: Non-serializable attribute (Java Object Serialization)
We just switched to Glassfish V2.  We are now getting errors when setting a session attribute.

Error is:

    java.lang.IllegalArgumentException: PWC2788: setAttribute: Non-serializable attribute

Code is:

    getRequest().getSession().setAttribute("questionsForUser", getQuestions());

getQuestions() is just a simple getter which is inside an abstract class named 'Parent Action'....so to make getQuestions() a serialized object does my class need to implement serializable?:

    public List getQuestions() {
        return questions;
    }

 - How can we make this object
   serializable?
 - is it a good practice to only put
   serialized object in the session (as
   Glassfish appears to be requiring)?
 - Are there risks of sessions being
   swapped between users with serialized
   objects?


setAttribute: Non-serializable attribute (Java Object Serialization)
===

We just switched to Glassfish V2.  We are now getting errors when setting a session attribute.

Error is:

    java.lang.IllegalArgumentException: PWC2788: setAttribute: Non-serializable attribute

Code is:

    getRequest().getSession().setAttribute("questionsForUser", getQuestions());

getQuestions() is just a simple getter which is inside an abstract class named 'Parent Action'....so to make getQuestions() a serialized object does my class need to implement serializable?:

    public List getQuestions() {
        return questions;
    }

 - How can we make this object
   serializable?
 - is it a good practice to only put
   serialized object in the session (as
   Glassfish appears to be requiring)?
 - Are there risks of sessions being
   swapped between users with serialized
   objects?

