Re: Why don't we use version-based optimistic locking?

From: Gili (cowwo..bs.darktech.org)
Date: Mon Aug 29 2005 - 15:49:05 EDT

  • Next message: Gili: "Re: Why don't we use version-based optimistic locking?"

            Ok fair enough.

    Thanks,
    Gili

    Andrus Adamchik wrote:
    >
    > On Aug 29, 2005, at 3:06 PM, Gili wrote:
    >
    >> ... register a lots of new objects ...
    >> ... flush objects to DB-layer of transaction ...
    >> ... repeat 1000 times ...
    >> ... commit/flush the transaction ...
    >
    >
    > Actually I was totally wrong - you can have a transaction wrapping one
    > or more DataContexts - container-managed transactions. I just don't use
    > this functionality, so i forgot.
    >
    > (1) configure Cayenne DataDomain to use Container Managed Transactions
    > in the Modeler.
    > (2) initiate a J2EE transaction somehow ... I am less certain about
    > your options here. It worked within the EJB environment. I guess Spring
    > can also help here.
    > (3) For each batch of objects create a new DataContext, then commit,
    > dispose of this DataContext, and create a new one for the new batch.
    > (4) at the end trigger a commit of the wrapper J2EE transaction.
    >
    > Andrus
    >
    >

    -- 
    http://www.desktopbeautifier.com/
    



    This archive was generated by hypermail 2.0.0 : Mon Aug 29 2005 - 15:49:05 EDT