Re: Multi-tier: Using setPersistanceState as a trigger point server-side.

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Feb 28 2006 - 06:11:11 EST

  • Next message: Pirola Davide: "java.util.Date & StoredProcedure"

    I would go with TransactionDelegate. Since M11 it is guaranteed to be
    committed/rolledback in the same DB transaction as DataContext that
    triggered delegate callback. See fresh docs here:

    http://objectstyle.org/confluence/display/CAYDOC/Understanding
    +Transactions

    Andrus

    On Feb 27, 2006, at 4:58 AM, Marek Wawrzyczny wrote:

    > Hi all,
    >
    > We are contemplating using the setPersistanceState in
    > CayenneDataObject as a
    > trigger function to create a replication queue record per each
    > record insert
    > or update into the database (this is on server side in a multi-tier
    > setup).
    > At present the business logic prevents us from creating stored
    > procedures.
    >
    > Before we go down that way, I'm hoping someone can make us aware of
    > any
    > caveats associated with this use of setPersistanceState? Perhaps
    > there are
    > better ways to achieve the same result?
    >
    > Kind regards,
    >
    > Marek Wawrzyczny
    >



    This archive was generated by hypermail 2.0.0 : Tue Feb 28 2006 - 06:11:15 EST