You mean your own DTO's or do you just unregister your Cayenne Objects
so they are transient?
I store my User object in my Visit, but by just storing it's ObjectId.
My understanding is this is serializable. BTW, is there a way to easily
serialize ObjectId to string format?
J
-----Original Message-----
From: Joshua Pyle [mailto:joshua.t.pyl..mail.com]
Sent: Monday, December 05, 2005 7:30 PM
To: cayenne-use..bjectstyle.org
Subject: Re: Thread Bound DataContexts - Bad Pattern?
Yes I use Transfer objects to store data from cayenne over the life of
a session. I've found that never storing cayenne objects in the
session scope cleans up my application and makes session failovers
much cleaner.
Joshua T. Pyle
On 12/5/05, Tore Halset <halse..vv.ntnu.no> wrote:
> On Dec 5, 2005, at 18:04, Joel Trunick wrote:
>
> > I've been putting static methods on my domain objects to perform
> > things
> > like queries (for that object), and even simple methods load an
> > instance
> > by ID (returning an instance of the proper type). I find this
> > organization very straightforward to use from a client perspective.
>
> I am doing the same, but with DataContext bound to a tapestry Visit
> object. Just include the context as a argument to the static methods.
>
> > 1) When do you ever need multiple datacontexts? (right now from web
> > app)
>
> I use extra DataContext to generate some reports as it is very nice
> to be able to throw away the DataContext afterwords to save memory.
>
> > 2) Is the thread bound context a limitation?
>
> I have not used thread bound context that much. You will have to be
> sure that the contexts are the same as any data objects that live
> longer than a single request/response. *Or* move objects between
> contexts.
>
> Regards,
> - Tore.
>
-- Joshua T. Pyle Go has always existed.
This archive was generated by hypermail 2.0.0 : Mon Dec 05 2005 - 21:33:04 EST