On Apr 24, 2007, at 12:58 PM, Oilid Adsi wrote:
> Normally I thought we can do the workaround with committing every
> query (method commitChanges in the DataContext) or setting the JDBC-
> parameter defaultAutoCommit="true". But both of these workarounds
> didn't work properly.
I am sure they did not. I was surprised when Peter reported that
'commitChanges' worked as a workaround. This shouldn't make any
difference.
> Postgres-JDBC-driver 8.2-504.jdbc3
Worth checking a different version as well (I've see strangest cross-
version issues with the driver in the past).
>> Also could you possibly switch the DataSource to DBCP [2] and see if
>> that DBCP DataSource does the right thing?
> We will do this switch and give feedback.
Please do. This will be an indication of whether we need to fix our
connection pool or not.
> Why cayenne uses a transaction (BEGIN - COMMIT) for performing a
> select-query? Is this the useful way as described on this link:
> http://www.ashtech.net/~syntax/blog/archives/56-Hibernate-and-
> PostgreSQL-Require-Transactions.html
Main reason is consistency. There can be select queries that are not
just select (e.g. stored procedure queries that both select and
update). So Cayenne handles all queries the same way, instead of
trying to analyze each query coming down the pipe.
Andrus
This archive was generated by hypermail 2.0.0 : Tue Apr 24 2007 - 06:23:05 EDT