cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Scheibe <dscheib...@googlemail.com>
Subject Cayenne and transactions
Date Sun, 05 Feb 2012 11:11:05 GMT
Hi guys,

i'm trying to figure out how Cayenne is handling transactions in regards 
of when data is transferred to the database. I am trying to get some 
large transactions (many small records or a few very large records) 
working and so far haven't had luck. If i understand correcly, Cayenne 
is holding my records in a cache and when i execute the commitChanges() 
on the ObjectContext it starts to transfer all of the data to the 
database (isolated in a real database transaction). So my question is 
(and please correct me if my previuos assumption is wrong) how can I 
influence on this behaviour since i pretty much need Cayenne to use the 
database transaction more directly. When i skip Cayenne and issue SQL 
statements right through the JDBC connection (ie.g. BEGIN TRANSACTION, 
UPDATE, UPDATE, UPDATE..., COMMIT TRANSACTION) it works fine as with 
MySQL i'm only restricted to the maximum allowed size of the InnoDB 
transaction logfile which is quite sufficient for my purposes. On the 
other hand i completely understand that Cayenne would not know when i've 
finished working with an Entity as there is no kind of "save" command on 
the Entity itself.

Oh, this of course only goes for storing data inside the database, not 
for reading.

Maybe some of you guys with a bit more insight into the Cayenne 
internals can help me out on this or point me to the right direction.

Thanks in advance and a refreshing weekend!

Cheers,
Daniel

Mime
View raw message