Re: Transactions

2024-11-13 Thread Christian Gonzalez
At some point we turned it on because there was a procedure that caused issues since it handled its own transactions but I believe we can work around that. I Turned it back off and it looks like transactions are now working correctly. Out of curiosity since there's still the possibility t

Re: Transactions

2024-11-13 Thread John Huss
At some point we turned it on because there was a procedure that caused > issues since it handled its own transactions but I believe we can work > around that. I Turned it back off and it looks like transactions are now > working correctly. Out of curiosity since there's still the >

Re: Transactions

2024-11-13 Thread Christian Gonzalez
t need to change the > setting for the whole CayenneRuntime. > > On Wed, Nov 13, 2024 at 12:01 PM Christian Gonzalez < > christian.gonza...@smartscrubs.com> wrote: > > > At some point we turned it on because there was a procedure that caused > > issues since it handl

Re: Transactions

2024-11-11 Thread Paul Furbacher
From the docs (https://cayenne.apache.org/docs/4.2/cayenne-guide/#transactions): If you are using Spring, EJB or another environment that manages transactions, you’ll likely need to switch the Cayenne runtime into "external transactions mode". This is done by setting the DI con

Re: Transactions

2024-11-11 Thread John Huss
r - *** no rollback - transaction > controlled externally. > > Does this mean the tx.rollback() was not performed? > Yes I think so. I suspect the begin was also not performed. I haven't used that external transactions setting before. Is this a setting you know that you need to have ac

Re: Transactions

2024-11-11 Thread Christian Gonzalez
gt; context.commitChanges(); > tx.commit(); > > } catch (Exception e) { > tx.rollback(); > throw e; > } > > On Fri, Nov 8, 2024 at 5:21 PM Christian Gonzalez < > christian.gonza...@smartscrubs.com> wrote: > > > Also forgot to mention but the runtime is

Re: Transactions

2024-11-08 Thread John Huss
(Exception e) { tx.rollback(); throw e; } On Fri, Nov 8, 2024 at 5:21 PM Christian Gonzalez < christian.gonza...@smartscrubs.com> wrote: > Also forgot to mention but the runtime is configured with external > transactions enabled. > > On Fri, Nov 8, 2024 at 4:14 PM

Re: Transactions

2024-11-08 Thread Christian Gonzalez
Also forgot to mention but the runtime is configured with external transactions enabled. On Fri, Nov 8, 2024 at 4:14 PM Christian Gonzalez < christian.gonza...@smartscrubs.com> wrote: > Hello, I am currently using cayenne 4.2 and am running into some issues > when committing my chan

Transactions

2024-11-08 Thread Christian Gonzalez
bject context, not actually rollback the changes in the database. I also tried a mixture of this example provided for transactions in the cayenne documentation <https://cayenne.apache.org/docs/4.2/cayenne-guide/>and this example at the bottom from apache <https://nightlies.apache.org/cayenne

Re: External transactions...

2012-05-18 Thread Daniel Scheibe
Hibernate, you can keep your context around between multiple transactions. All selects (direct, or when reading lazy relationships) as well as commits result in connection request from a DataSource, so it has to be in a valid state (within an open tx?) when that happens. After an operation is per

Re: External transactions...

2012-05-18 Thread Andrus Adamchik
itional objects due to relationships that have to be resolved on > access? ObjectContext will request a new connection from the DataSource. Whether it can be granted at a given point or not depends on your app. So again, unlike in Hibernate, you can keep your context around between multipl

External transactions...

2012-05-16 Thread Daniel Scheibe
Hi all, i'm just in the process of creating a web application bound to cayenne in the backend. I'm using external transactions (XA with multiple databases) and basically start/commit/rollback a transaction whenever i have something to change inside the databases. While this is wor

Re: Cayenne and transactions

2012-02-07 Thread Daniel Scheibe
2012/2/7 Andrus Adamchik > This thread is pretty long, so I am not sure if I missed that suggestion, > but manual transactions would allow you to wrap multiple commitChanges > calls, allowing JVM to split commits and limit memory. Essentially you > start a manual transaction, bindi

Re: Cayenne and transactions

2012-02-07 Thread Andrus Adamchik
This thread is pretty long, so I am not sure if I missed that suggestion, but manual transactions would allow you to wrap multiple commitChanges calls, allowing JVM to split commits and limit memory. Essentially you start a manual transaction, binding it to the current thread, then do as many

Re: Cayenne and transactions

2012-02-07 Thread Daniel Scheibe
;> in chunks but its more work and harder to maintain the rollback of the >>>>>> process if something goes wrong or fails during the import phase. As >>>>>> previously mentioned i have it working with plain SQL statements but >>>>>> would love

Re: Cayenne and transactions

2012-02-06 Thread Aristedes Maniatis
phase. As previously mentioned i have it working with plain SQL statements but would love to integrate Cayenne in between to get the full advantage and convenience of an O/R mapper. Furthermore i'm using XADisk's support for transactions on the filesystem level to keep it synchronized with the

Re: Cayenne and transactions

2012-02-06 Thread Daniel Scheibe
with plain SQL statements but would love to integrate Cayenne in between to get the full advantage and convenience of an O/R mapper. Furthermore i'm using XADisk's support for transactions on the filesystem level to keep it synchronized with the database (also works out great with

Re: Cayenne and transactions

2012-02-05 Thread Aristedes Maniatis
integrate Cayenne in between to get the full advantage and convenience of an O/R mapper. Furthermore i'm using XADisk's support for transactions on the filesystem level to keep it synchronized with the database (also works out great with larger transactions). Appreciating your help! I will s

Re: Cayenne and transactions

2012-02-05 Thread Daniel Scheibe
antage and convenience of an O/R mapper. Furthermore i'm using XADisk's support for transactions on the filesystem level to keep it synchronized with the database (also works out great with larger transactions). Appreciating your help! I will search the list again, maybe i've missed

Re: Cayenne and transactions

2012-02-05 Thread Aristedes Maniatis
n SQL statements but would love to integrate Cayenne in between to get the full advantage and convenience of an O/R mapper. Furthermore i'm using XADisk's support for transactions on the filesystem level to keep it synchronized with the database (also works out great with larg

Re: Cayenne and transactions

2012-02-05 Thread Daniel Scheibe
grate Cayenne in between to get the full advantage and convenience of an O/R mapper. Furthermore i'm using XADisk's support for transactions on the filesystem level to keep it synchronized with the database (also works out great with larger transactions). Appreciating your help! I will

Re: Cayenne and transactions

2012-02-05 Thread Aristedes Maniatis
On 5/02/12 10:11 PM, Daniel Scheibe wrote: 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&

Cayenne and transactions

2012-02-05 Thread Daniel Scheibe
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, C

Re: Setting up Cayenne and Jackrabbit for distributed transactions

2012-01-27 Thread Andrus Adamchik
Hi Daniel, Don't know much about JCR transactions (even though I'd like to try it some day, in a scenario similar to yours). In Cayenne you can simply check "Container Managed Transactions", and it won't attempt to commit or rollback connections. From there you can

Setting up Cayenne and Jackrabbit for distributed transactions

2012-01-27 Thread Daniel Scheibe
Hey all, i'm just researching on how to setup cayenne and jackrabbit to share transactions. The background is that i want to store information in a database and very large files (linked to that information) in a jackrabbit repository (as having large files in a mysql database isn't the

Re: How to disable Transactions in Cayenne

2011-12-08 Thread Juergen Saar
ainer-managed transactions" for the DataDomain in the > Modeler would prevent Connection.commit() from being executed. Not sure if > this is the solution you are looking for. > > Juergen's approach sounds good too - DataSource (and by extension > Connections, Statements, etc.)

Re: How to disable Transactions in Cayenne

2011-12-08 Thread Andrus Adamchik
Checking "Container-managed transactions" for the DataDomain in the Modeler would prevent Connection.commit() from being executed. Not sure if this is the solution you are looking for. Juergen's approach sounds good too - DataSource (and by extension Connections, Statements,

Re: How to disable Transactions in Cayenne

2011-12-06 Thread Dirk Wellmann
Hello Juergen, sometimes it's so simple! Thank you for your hint and the Source! Many Regards Dirk Am 06.12.2011 11:44, schrieb Juergen Saar: /* * Created on 05.08.2004 */ package com.dingens.ifx.persistence.jdbc; import java.sql.Connection; import java.sql.Driver; import java.sql.Driver

Re: How to disable Transactions in Cayenne

2011-12-06 Thread Juergen Saar
LException { // --- transactions not suppoted by this driver --- } /* * (non-Javadoc) * * @see java.sql.Connection#getAutoCommit() */ public boolean getAutoCommit() throws SQLException { return myConn.getAutoCommit(); } /* * (non-Javadoc) * * @see java.sql.Connection#commit() */ public void commi

How to disable Transactions in Cayenne

2011-12-06 Thread Dirk Wellmann
Hello List, we've a Project in witch we want to access and write a Database in NonTransactional mode, because this "oldschool" - System doesn't support Transactions. But we've a functional JDBC-Driver. Is there a possible way to disable Transactions or register a Tran

RE: Cayenne Transactions

2011-09-14 Thread Durchholz, Joachim
On 14/09/11 9:15 PM, Durchholz, Joachim wrote: >> dropping down to native SQL, > > Moving to SQL will not be one of the changes you'll need to make. Ah, I see I was being unclear. I meant the places where the program drops down to raw SQL. E.g. for importing data from other databases where the a

Re: Cayenne Transactions

2011-09-14 Thread Aristedes Maniatis
On 14/09/11 9:15 PM, Durchholz, Joachim wrote: But getting rid of HQL, dropping down to native SQL, and changing all the Hibernate types to Cayenne types could require a lot of rewriting that don't improve the project in themselves; also, I do have some trepidation that I'll need to rework par

RE: Cayenne Transactions

2011-09-14 Thread Durchholz, Joachim
> I think you misunderstood - there are 1..1 relationships in Cayenne of > course. Phew. > There's no one to one correspondence between Cayenne and Hibernate features > :-) Phew :-))) (Some of Hibernate's features are massive misfeatures IMNSHO.) Re my own status, I was forced to shelve the

Re: Cayenne Transactions

2011-09-14 Thread Andrus Adamchik
On Sep 14, 2011, at 12:18 PM, Durchholz, Joachim wrote: >> if you are looking for 1..1 correspondence, there won't be one > > Oh. That's one difference I missed. > > We do have a one-to-one relationship, with one end optional. > How does one deal with that in Cayenne? I think you misunderstood

RE: Cayenne Transactions

2011-09-14 Thread Durchholz, Joachim
> if you are looking for 1..1 correspondence, there won't be one Oh. That's one difference I missed. We do have a one-to-one relationship, with one end optional. How does one deal with that in Cayenne? > See other replies in this thread. I can only add that Cayenne is as mature as > Hibernate,

Re: Re : Cayenne Transactions

2011-09-13 Thread Andrus Adamchik
gration even though they may have been worded as "no Spring required" :)) > * persistent entities have to inherit from a cayenne object I'd say this is a nice alternative to runtime proxies. > * transactions are made manually and doe not use the standard ones > (javax.tr

Re : Cayenne Transactions

2011-09-13 Thread stéphane Lestoclet
r, and perform >transactions explicitly in code rather than using an AOP approach. I understand that Cayenne works but do you mean that it does not integrate with Spring ? If so, why the Cayenne documentation states the opposite ? Do you also mean that Cayenne Transactions don't work wit

Re: Cayenne Transactions

2011-09-13 Thread Andrus Adamchik
} } Andrus On Sep 11, 2011, at 5:41 PM, stéphane Lestoclet wrote: > Hi, > > > The Cayenne documentation states the following : > > Chapter: Understanding Transactions >> It works either as a standalone mechanism, or in conjunction with another >> t

Re: Cayenne Transactions

2011-09-13 Thread Mike Kienenberger
> > Chapter: Understanding Transactions >>It works either as a standalone mechanism, or in conjunction with another >>transaction framework, such as JTA or Spring.. > > Could you provide examples for both please ? > > Actually, I am new to Apache Cayenne and I am

Re: Cayenne Transactions

2011-09-12 Thread Malcolm Edgar
Please take a look at the example at the bottom of the page: http://cayenne.apache.org/doc20/understanding-transactions.html I use Cayenne in a fairly straight forward manner, and perform transactions explicitly in code rather than using an AOP approach. With regard to Spring integration

Cayenne Transactions

2011-09-11 Thread stéphane Lestoclet
Hi, The Cayenne documentation states the following : Chapter: Understanding Transactions >It works either as a standalone mechanism, or in conjunction with another >transaction framework, such as JTA or Spring.. Could you provide examples for both please ? Actually, I am new to

Re: Handling transactions with ingres

2011-05-25 Thread Lucas Holt
On May 25, 2011, at 3:46 PM, Andrus Adamchik wrote: > Know nothing about Ingres specifically, but when Cayenne runs a SQLTemplate > (either selecting or updating, doesn't matter), it calls > "Connection.commit()" on JDBC Connection object at the end of the operation. > > Andrus > Interestin

Re: Handling transactions with ingres

2011-05-25 Thread Andrus Adamchik
Know nothing about Ingres specifically, but when Cayenne runs a SQLTemplate (either selecting or updating, doesn't matter), it calls "Connection.commit()" on JDBC Connection object at the end of the operation. Andrus On May 25, 2011, at 12:54 PM, Lucas Holt wrote: > At work, I'm starting a new

Handling transactions with ingres

2011-05-25 Thread Lucas Holt
At work, I'm starting a new application with cayenne 3.0.1. We're using Ingres which has a read lock for tables during select queries. To make matters more complicated, I need to do inserts to a table that is temporary and not in the db. I've worked around that using a sqltemplate, but it wont a

Re: transactions vs iterated query

2011-01-06 Thread Hans Pikkemaat
Hi, That sounds logical but the issue could be that the calling party is simply not aware that the called library is using cayenne. This would mean that an application which is calling some library always should clear (and keep) the transaction. This is not very logical. And what about the ot

Re: transactions vs iterated query

2011-01-06 Thread Andrus Adamchik
On Jan 6, 2011, at 10:48 AM, Hans Pikkemaat wrote: > One library calls the other one. > The first one is using the iterated query to get some data. It will call the > second > library to process the data. IMO this first library (iterator control code) should be the place that does transaction

Re: transactions vs iterated query

2011-01-06 Thread Hans Pikkemaat
Hi, After some investigation it comes down to two problems 1) An example. I have 2 libraries. One library calls the other one. The first one is using the iterated query to get some data. It will call the second library to process the data. This second library however is not aware of a iterated

Re: transactions vs iterated query

2011-01-05 Thread Andrus Adamchik
Haven't thought about this scenario deeply... How about this: In the simplest case you can keep your changes in the DataContext while iterating over the result (DataContext by itself is not permanently bound to a transaction). And then commit them after iteration is finished. This will work if

transactions vs iterated query

2010-12-29 Thread Hans Pikkemaat
Hi, I'm using an iterated query to process a huge amount of data which cannot be loaded at once. This query creates its own transaction and binds it to the current thread. This means that when I process the data I received from the iterated query all queries use the transaction created by the

Re: Cayenne Transactions vs MySQL Transactions

2010-10-28 Thread Michael Gentry
MIT from the DB)? > > About point 2, I was asking your opinion about the degree of reliability on > comparing cayenne's optimistic locking with lockings from the DB. Or do you > mean > cayenne uses this mechanism straight from the DB? I was always a little > confused >

RE: Cayenne Transactions vs MySQL Transactions

2010-10-28 Thread Bruno René Santos
Oh and yes I'm using INNODB :) Thanx again Bruno -Mensagem original- De: Michael Gentry [mailto:mgen...@masslight.net] Enviada: quinta-feira, 28 de Outubro de 2010 15:16 Para: user@cayenne.apache.org Assunto: Re: Cayenne Transactions vs MySQL Transactions 1) Cayenne does a

RE: Cayenne Transactions vs MySQL Transactions

2010-10-28 Thread Bruno René Santos
)? About point 2, I was asking your opinion about the degree of reliability on comparing cayenne's optimistic locking with lockings from the DB. Or do you mean cayenne uses this mechanism straight from the DB? I was always a little confused about if cayenne implemented these two mechanis

Re: Cayenne Transactions vs MySQL Transactions

2010-10-28 Thread Michael Gentry
1) Cayenne does a begin transaction and end transaction when it commits (assuming you aren't using container-managed transactions, in which Cayenne is deferring that operation to the container). Are you at least using InnoDB with MySQL? MySQL hasn't had the best track record fo

Cayenne Transactions vs MySQL Transactions

2010-10-28 Thread Bruno René Santos
Hello all, First, sorry about so many doubts in so little time, but I’m trying to decide how to do some things on my application concerning cayenne. So adding to my previous doubts, here goes some more doubts: 1. Do cayenne transactions guarantee consistency as MySQL transactions

Re: Cayenne Transactions

2008-03-06 Thread Malcolm Edgar
to reuse the same transaction between requests, I'd > suggest using some other transaction manager (Spring? J2EE? I never > tried cross-request transactions, not sure what solution is the best). > For Cayenne to play nicely with it, check "Container Managed > Transactio

Re: Cayenne Transactions

2008-03-06 Thread Andrus Adamchik
If the goal is to reuse the same transaction between requests, I'd suggest using some other transaction manager (Spring? J2EE? I never tried cross-request transactions, not sure what solution is the best). For Cayenne to play nicely with it, check "Container Managed Transactio

Cayenne Transactions

2008-03-06 Thread Malcolm Edgar
Can Cayenne Transactions be stored in a HttpSession? regards Malcolm Edgar

Re: Transactions , Primary Keys

2007-09-23 Thread Aristedes Maniatis
On 23/09/2007, at 2:23 PM, Philip Copeland wrote: Did you have an issue committing every "several thousand records". What would you do if it failed at that stage - did you figure out a way to resume again at a known point? Handling large imports is never easy. Initially we had some memory i

RE: Transactions , Primary Keys

2007-09-22 Thread Philip Copeland
apache.org Subject: Re: Transactions , Primary Keys On 23/09/2007, at 8:26 AM, Philip Copeland wrote: > The main problem I'm facing is that objects don't get written to the > database (nor Primary Keys generated) unless we commit our > transaction. > What I'm wishing for is

Re: Transactions , Primary Keys

2007-09-22 Thread Aristedes Maniatis
On 23/09/2007, at 8:26 AM, Philip Copeland wrote: The main problem I'm facing is that objects don't get written to the database (nor Primary Keys generated) unless we commit our transaction. What I'm wishing for is a mode where all changes are made to the underlying database - but not commit

Transactions , Primary Keys

2007-09-22 Thread Philip Copeland
Hi, We've used Cayenne extensively over the last 2 years - with great success on many projects. I'm in the process of designing & implementing a generic import/export feature for some of our projects - and its raising some difficult issues that I don't know how to resolve. We're currently

Re: user-defined transactions

2007-04-26 Thread Andrus Adamchik
On Apr 26, 2007, at 1:04 PM, Jens Mayer wrote: (Here is the first question: is it possible to bind two different transactions to the same thread?) No you can't. I am accessing two different db-schemas at the same time, using two DataDomains, one for each schema. Now I want to update

user-defined transactions

2007-04-26 Thread Jens Mayer
two different transactions, one for each Domain. So that's my plan to handle the transactions: Transaction tx1 = domain1.createTransaction(); Transaction tx2 = domain2.createTransaction(); Transaction.bindThreadTransaction(tx1); Transaction.bindThreadTransaction(tx2); (Here is the first que