Most of the J2EE application servers you see rely on ThreadLocal for
supporting transaction management.
regards Malcolm Edgar
On 12/6/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.
>
This archive was generated by hypermail 2.0.0 : Mon Dec 05 2005 - 17:31:36 EST