Re: Stored Procedure Query and Transactions

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Feb 28 2005 - 11:39:54 EST

  • Next message: Andrus Adamchik: "Re: Stored Procedure Query and Transactions"

    > Hi,
    >
    > I have some existing oracle stored procedures with business logic in our
    > DB. I have created cayenne model for those procedures. I am calling
    > storedProceA and then storedProcB. I have a requirement where I need to
    > rollback all the work done by storeProcA if storeProcB fails. Is it
    > possible to rollback stored procedure call using cayenne ? Please let me
    > know if there is a way to tie both the storeProc calls in a single
    > transaction and either commit or rollback in a single transaction.
    >
    > - Bhagwanji

    Hi,

    You will need to run Cayenne with "external transactions" flag checked,
    and provide some external transaction mechanism. The easiest (but not the
    only) way to implement such externa transactions is to use Spring
    framework (www.springframework.org). Cayenne-Spring integration code and
    examples can be downloaded from here -
    http://objectstyle.org/cayenne/lists/cayenne-user/2004/12/0153.html (it is
    submitted to Spring already and is scheduled to become a part of their
    official distro in 1.3 release).

    And of course make sure that your procedures do not commit internally...

    Andrus



    This archive was generated by hypermail 2.0.0 : Mon Feb 28 2005 - 11:39:57 EST