On 18-10-2008, Christoph Zwerschke wrote:
> William Dode schrieb:
>> Then i have to set closeable when i create it ?
>> What i would like is to have closeable set to False, and decide *after*  
>> (for maintenance of the db) that i want a brut close.
>
> You can set closeable to True when creating the PersistentDB instance, 
> then all connections will be closeable. But you usually don't want that. 
> Instead, the idea is to silently ignore the close and next time a 
> connection in that thread is requested, reuse that same connection.
> When you close your application and all threads are shut down, then the 
> connections will be closed automatically. Closing them earlier will not 
> help, since PersistentDB will try to reopen them anyway when a thread 
> requests a new connection. If the database is shut down, then your 
> threads get connection errors, and when it is up again, new connections 
> will be opened again.

You're right, i will handle this at the application level. I mean, it's 
safer to stop the application if i need some maintenance on the 
database.

-- 
William Dodé - http://flibuste.net
Informaticien Indépendant


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Webware-devel mailing list
Webware-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to