context - in thread or session?

From: Tore Halset (
Date: Thu Oct 12 2006 - 03:31:05 EDT

  • Next message: Řyvind Harboe: "Re: context - in thread or session?"


    Sorry for bringing up this old issue..

    I have read this thread and talked to Řyvind Harboe about it.


    and Mike Kienenbergers solution.


    I am binding DataContext to a session via tapestry-3 Visit. This has
    not been a problem in my application. Probably as most of the heavy
    cayenne use are done via a swing client that does not make parallell
    requests. The web-guis that are using tapestry+cayenne are mostly
    read only. The read/write stuff are mostly for internal administration.

    So I see the following two possible situations:
      * One Context per session: Must make sure only one thread are using
    the same session at a time. F.eks. by using Mike Kienenbergers filter
    that synchronizes on the session-object.
      * One Context per thread: Thread safe, but will have to move
    objects between Contexts for objects that live longer than a single
    request. Can this be done sort of automatically?

      - Tore.

    This archive was generated by hypermail 2.0.0 : Thu Oct 12 2006 - 03:31:59 EDT