On Feb 27, 2004, at 3:55 AM, Vassilis Raxenidis wrote:
> 1. Get a connection from the pool.
> 2. Perform the query by using this connection
> 3. Release the connection
That is exactly how Cayenne works.
> If the query is to be performed during a network down time then an
> may be thrown.
> Then query may keep on trying until the network is up again. When the
> network is stabilized then a valid
> connection will be returned from the pool and the query will be
This should work ok.
> It seems that cayenne acquires a connection the first time that the
> has to be performed and then uses the
> same connection in any subsequent query execution.
Not true... Aside from possible bugs, Cayenne always closes connection
regardless whether an error has occurred or not. If queries are run in
a batch (e.g. commit of multiple modified objects), an exception in any
of the batch queries would terminate the whole batch and close the
There is a related bug report that may be related to your observations:
http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-97 . It has
been fixed, but not yet released. A patched version can be downloaded
preview2.tar.gz . Let me know if it fixes the problem. If not, could
you send a stack trace of exception that happens when attempting to run
a query over broken connection.
This archive was generated by hypermail 2.0.0 : Fri Feb 27 2004 - 12:30:04 EST