BTW, if there's no commit or rollback, and the transaction stays open
indefinitely, this would result in quick connection pool exhaustion.
So why would you do that?
Andrus
On Mar 9, 2008, at 7:19 PM, Andrus Adamchik wrote:
This could be a DB artifact. E.g. with MySQL MyISAM tables. Which DB
are you using?
Andrus
On Mar 8, 2008, at 5:53 AM, Malcolm Edgar wrote:
I have been playing around this in a web context, and what I am
finding with a user created Transaction, if the DataContext commits
the changes, unless the Transaction explicitly performs a rollback
the
changes will be committed to the database.
This is not what I was expecting, but I am wondering if this is an
artifact of the thread pool, ie maybe the same thread is coming back
of the pool.
regards Malcolm Edgar
On Tue, Feb 19, 2008 at 8:31 PM, Malcolm Edgar <[EMAIL PROTECTED]
> wrote:
Great! Thanks for that.
regards Malcolm Edgar
On Feb 19, 2008 11:18 AM, Andrus Adamchik <[EMAIL PROTECTED]>
wrote:
Just use your own transactions, then 'commitChanges' turns into
'flush':
http://cayenne.apache.org/doc/understanding-transactions.html
Andrus
On Feb 18, 2008, at 7:49 AM, Malcolm Edgar wrote:
Hi Ari,
thanks for the response. This would be a very good 3.0 feature
if it
is not already present.
In Hibernate this functionality is performed as a flush operation,
where CRUD operations are performed against the transaction but
are
not actually committed.
Would this would cause issues with Cayenne PK generation
strategy, are
the highest/last table id values they maintained in memory?
regards Malcolm Edgar
On Feb 18, 2008 3:16 PM, Aristedes Maniatis <[EMAIL PROTECTED]>
wrote:
On 18/02/2008, at 2:07 PM, Malcolm Edgar wrote:
Is there a way in Cayenne, possibly using Transactions, that
we can
perform this import, do inserts and queries against the
transaction
and only commit/rollback at the end?
Subclass the Cayenne context, override performQuery and add in
your
own custom code there to look for new objects within the context?
There is almost certainly a way to have a database transaction
cross
several Cayenne commits as well, but I can't assist there.
In fact we've done this several times in our application and I
was
just thinking the other day whether this might be an option in
a new
generified performQuery and might be useful to be pushed into
Cayenne.
Ari Maniatis
-------------------------->
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001 fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49
102A