Re: Serialization of DataContext

From: Craig Miskell (cmiskel..lbatross.co.nz)
Date: Mon Sep 16 2002 - 15:56:28 EDT

  • Next message: Andrus: "Fwd: Re: cayenne-cmd-app"

    Works wonderfully, I've been running it already. Eclipse rocks though -
    the imports ext are in *exactly* the same place... I'm tracking against
    the latest cvs version, and when I updated I only got a conflict on
    DataContext where the formatting was different (comments).

    This fix certainly solves my immediate problems - I'm storing both a
    DataContext and a data object in a serialized session with no ill effects.
    It sure is nice to be able to shutdown/restart tomcat and still keep my
    session, or at least it will be once I get into serious coding and am
    testing stuff 3-4 pages deep in the app and don't have to keep logging
    back in *every* time. :=)

    Thanks again,
    Craig

    On Mon, 16 Sep 2002, Andrus wrote:

    > Hi Craig,
    >
    > I just applied your patch to DataContext (with only changes being code
    > formatting). I also changed ObjectId & ToManyList to implement Serializable
    > interface. Let us know if this works at all.
    >
    > Also I guess we need some unit tests of serialization behavior. I skipped
    > that part for now.
    >
    > Andrus
    >
    >
    >
    > At 04:34 PM 9/13/2002 +1200, Craig Miskell wrote:
    > >Subsequent to my ramblings on the user list, attached is a cvs diff of
    > >changes that add Serialization ability to DataContext. If the parent of
    > >the DataContext is a DataDomain, it serializes the name of the domain,
    > >rather than the DataDomain. If the parent is other than a DataDomain, it
    > >just hopes that the parent is Serializable, so it'll work for simple cases
    > >at least.
    > >
    > >Also required is to add "implements Serializable" to
    > >org.objectstyle.cayenne.access.ToManyList and
    > >org.objectstyle.cayenne.ObjectID
    > >but I couldn't quite be bothered putting together patch files for those
    > >two :-)
    > >
    > >On with the battles
    > >
    > >Craig Miskell
    > >Programmer, Black Albatross, Otago University, New Zealand
    > >-----BEGIN GEEK CODE BLOCK-----
    > >Version: 3.1
    > >GCS d- s+:- a-->? C++++(++)$ ULXH+++$>++++ P+>++++ L++$>++++$ E--- W+++$
    > >N+ K? w--- !O M-- V? PS--- PE Y t++ 5 X+++ R-- tv+ b+>+++ DI++++ D+ G+ e++
    > >h--- r+++ y+++
    > >------END GEEK CODE BLOCK------
    >
    >

    Craig Miskell
    Programmer, Black Albatross, Otago University, New Zealand
    -----BEGIN GEEK CODE BLOCK-----
    Version: 3.1
    GCS d- s+:- a-->? C++++(++)$ ULXH+++$>++++ P+>++++ L++$>++++$ E--- W+++$
    N+ K? w--- !O M-- V? PS--- PE Y t++ 5 X+++ R-- tv+ b+>+++ DI++++ D+ G+ e++
    h--- r+++ y+++
    ------END GEEK CODE BLOCK------



    This archive was generated by hypermail 2.0.0 : Mon Sep 16 2002 - 15:56:59 EDT