Re: Storing DataObjects in Session

From: John Emmanuel (emmanuel.joh..mail.com)
Date: Sat May 10 2008 - 02:56:54 EDT

  • Next message: Michael Gentry: "Re: many-to-many mapping resulting in incomplete SQL queries"

    Thank you very much Andrus.

    On Fri, May 9, 2008 at 4:43 PM, Andrus Adamchik <andru..bjectstyle.org>
    wrote:

    >
    > On May 9, 2008, at 8:31 AM, John Emmanuel wrote:
    >
    >
    >> I would like to know if it is ok to store DataObjects in session.
    >>
    >
    > Yes, as long as the DataContext that this object belongs to is also in the
    > session scope. Judging from the stack trace, it is in your case.
    >
    > I stored an employee dataobject in session and it worked fine.
    >> however with every restart of tomcat java.io.NotSerializableException is
    >> thrown.
    >> am i doing something wrong. i am using cayenne 3.0m3 and here is the stack
    >> trace -
    >>
    >
    > SEVERE: IOException while loading persisted sessions:
    >> java.io.WriteAbortedException: writing aborted;
    >> java.io.NotSerializableException:
    >> org.apache.cayenne.cache.MapQueryCache$CacheEntry
    >> java.io.WriteAbortedException: writing aborted;
    >> java.io.NotSerializableException:
    >> org.apache.cayenne.cache.MapQueryCache$CacheEntry
    >> at
    >> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333)
    >>
    >
    >
    > This turned out to be a bug. I just fixed it on trunk. It will go in M4:
    >
    > https://issues.apache.org/cayenne/browse/CAY-1053
    >
    > Andrus
    >
    >



    This archive was generated by hypermail 2.0.0 : Sat May 10 2008 - 02:57:43 EDT