You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Patric Lichtsteiner <pa...@lichtsteiner.org> on 2007/04/12 07:55:22 UTC
Cayenne commit separated from database commit
Hi
Is there a posibility to seperate the Cayenne commitChanges from the
database transaction?
I'd like to call multiple commitChanges, and at the end I should be
able to decide if everything should go into the database or not.
Any ideas?
Thanks
Patric
Re: Cayenne commit separated from database commit
Posted by Patric Lichtsteiner <pa...@lichtsteiner.org>.
Hi Andrus
Thanks a lot for your extremely fast answer, thats exactly what I was
searching for!
Patric
On 12.04.2007, at 08:00, Andrus Adamchik wrote:
> Hi Patric,
>
> Yes there is (short of using J2EE container transaction
> demarcation, which you can too). You can wrap your work in a manual
> transaction:
>
> http://cayenne.apache.org/doc/understanding-transactions.html
>
> (scroll to the bottom of the page, "User-Defined Transaction Scope"
> section).
>
> Andrus
>
>
> On Apr 12, 2007, at 9:55 AM, Patric Lichtsteiner wrote:
>> Hi
>>
>> Is there a posibility to seperate the Cayenne commitChanges from
>> the database transaction?
>> I'd like to call multiple commitChanges, and at the end I should
>> be able to decide if everything should go into the database or not.
>>
>> Any ideas?
>>
>> Thanks
>> Patric
>>
>
Re: Cayenne commit separated from database commit
Posted by Andrus Adamchik <an...@objectstyle.org>.
Hi Patric,
Yes there is (short of using J2EE container transaction demarcation,
which you can too). You can wrap your work in a manual transaction:
http://cayenne.apache.org/doc/understanding-transactions.html
(scroll to the bottom of the page, "User-Defined Transaction Scope"
section).
Andrus
On Apr 12, 2007, at 9:55 AM, Patric Lichtsteiner wrote:
> Hi
>
> Is there a posibility to seperate the Cayenne commitChanges from
> the database transaction?
> I'd like to call multiple commitChanges, and at the end I should be
> able to decide if everything should go into the database or not.
>
> Any ideas?
>
> Thanks
> Patric
>