db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: Derby, connection pooling and shutdown
Date Fri, 05 Oct 2007 08:13:50 GMT
Daniel Noll wrote:
> Hi all.
> At present I'm using Connection directly.  After I close it, if it's the last 
> connection open to the database I am doing a ;shutdown=true to force Derby to 
> properly close it.
> Now I'm changing things to use connection pooling to make things go smoother 
> when multiple threads want to do queries at the same time.  Supposing I use 
> an EmbeddedConnectionPoolDataSource, do I still need to do any manual 
> shutdown of the database after the connection pool manager is closed, or is 
> that all managed inside the ConnectionPoolDataSource implementation?

Hi Daniel,

Unless your connection pool manager does an explicit shutdown, you will 
have to do it manually.
When I say have to, I mean you have to if you want to avoid doing 
recovery on the next boot of the database. Everything will work even if 
you don't shutdown properly, but you have to pay the cost of recovery at 
the next startup.

It is of course considered good practice to shutdown properly, and it 
should be done if possible.


> Daniel

View raw message