>
>
> If you have a user transaction manually bound to thread, you'd still
> have to commit a DataContext via "commitChanges()" which basically
> does a flush without commit ... and then commit a transaction that
> does a DB commit (and calls the delegate method).
Yes. Sorry, my complicated explanation was just to walk you through the
process of getting to where I'm at right now. In 1.2M12, when I had a bound
transaction, and called DataContext.commitChanges(), it was commiting that
bound transaction. That's the short version of my story :)
But I guess the whole point of the delegate is to avoid manual
> transaction handling. So I am more interested whether Cayenne-
> initiated transactions work. More specifically if you replace this
> part of "willCommit" of the delegate:
>
> >>> transaction.performQueries(dataContext,
> >>> Collections.singleton(updateQuery), new DefaultOperationObserver() {
> >>>
> >>> ..verride
> >>> public boolean isIteratedResult() {
> >>> return true;
> >>> }
> >>>
> >>> });
>
> with this line:
>
> dataContext.performGenericQuery(query);
>
> That's what I meant by "running directly via DataContext"... implying
> "running directly via DataContext inside 'willCommit' method". Does
> it work?
Sorry, I thought you meant if I run it from the dataContext outside of the
delegate, which does not appear to work. I will try this way inside the
delegate.
Cris
This archive was generated by hypermail 2.0.0 : Mon Apr 10 2006 - 10:56:25 EDT