context - in thread or session?

From: Tore Halset (halse..vv.ntnu.no)
Date: Thu Oct 12 2006 - 03:31:05 EDT

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

    Hello.

    Sorry for bringing up this old issue..

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

    <http://mail-archives.apache.org/mod_mbox/incubator-cayenne-user/
    200609.mbox/%
    3cc09652430609290646j2a84697v1216d35667ffc9c..ail.gmail.com%3e>

    and Mike Kienenbergers solution.

    <http://mail-archives.apache.org/mod_mbox/incubator-cayenne-user/
    200609.mbox/%
    3c8f985b960609291128m529a63e4ra7e7de71b7353cc..ail.gmail.com%3e>

    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