cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Bankier <colinbank...@hotmail.com>
Subject Re: How to propoerly close context db connection
Date Sat, 19 Apr 2008 02:01:56 GMT


Thanks to everyone who posted to help me out. Sorry I was pulled away from
working on this for a while and only now got the time to finally solve it.
It turned out that, as Andrus mentioned, the problem was with the DB itself
- which is Derby in this case - and reading the docs on how to properly
shutdown the Derby database solved the problem.
A simple DriverManager.getConnection("jdbc:derby:;shutdown=true") did the
trick.
Cheers,
Colin.




Andrus Adamchik wrote:
> 
> Embedded DB's add a whole other dimension to that by keeping committed  
> data in memory at the driver level - something Cayenne is not aware  
> of. So anything you do with "clearCache" or RefreshQuery, etc.,  
> affects Cayenne cache, and not the embedded DB JDBC layer. So here  
> you'd need to read the embedded DB docs (is that Derby, HSQL, H2?) and  
> see what they recommend to do in such situation. There maybe a SQL  
> query that would shutdown/reopen the file, or something else (like  
> restarting the DataSource).
> 
> Andrus
> 

-- 
View this message in context: http://www.nabble.com/How-to-propoerly-close-context-db-connection-tp16392733p16767462.html
Sent from the Cayenne - User mailing list archive at Nabble.com.


Mime
View raw message