Re: Transaction STATUS problem

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Jun 09 2010 - 17:06:35 UTC

  • Next message: Bob Schellink: "Consolidate query and object cache"

    Actually no, and this is what makes it so strange. DataContext is
    thread-safe for read operations, so multiple threads can access it
    simultaneously. Transactions are bound to threads, and unbound in the
    finally block, so overlapping transactions between threads should not
    be possible, neither are overlapping transactions within a thread.

    So anything else special/customized about your transactions? In any
    event In recommend running your app in debugger and putting a
    breakpoint in DataDomain.runInTransaction(..) to check what really
    happens.

    Andrus

    On Jun 9, 2010, at 12:23 AM, Andrea Pavan wrote:

    > As you said, the problem persist also with H2, even if it happens
    > many time
    > less, maybe because H2 executes queries faster.
    > I synchronized the method for obtaining the thread bounded
    > DataContext, but
    > the problem still persist.
    > Have I to synchronize also the method that creates and performs query?
    >
    > Thanks for help.
    >
    > *Andrea*
    >
    > 2010/6/9 Andrea Pavan <prog.paw..mail.com>
    >
    >> No, "Container Managed Transactions" isn't checked.
    >>
    >> 2010/6/8 Andrus Adamchik <andru..bjectstyle.org>
    >>
    >> This seems like a race condition, and I am not sure that switching
    >> the DB
    >>> fixes it. I just don't understand how it can possibly happen. Do
    >>> you have
    >>> "Container Managed Transactions" set to on by any chance?
    >>>
    >>> Andrus
    >>
    >>



    This archive was generated by hypermail 2.0.0 : Wed Jun 09 2010 - 17:07:09 UTC