db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepa Remesh" <drem...@gmail.com>
Subject Re: Using Apache DBCP and Tomcat with Derby - database shutdown?
Date Thu, 07 Sep 2006 16:54:08 GMT
On 9/7/06, Susan L. Cline <home4slc@pacbell.net> wrote:
[snip]
>
> But this does not seem correct because I'm obtaining the connections to Derby via the
datasource
> and a pool, and here I am shutting the database down using the DriverManager class. 
Is this okay?
>
> I can't find anything in the DBCP documentation to help me shutdown the database cleanly.
>
To shutdown using Derby DataSource object, you may set
"ShutdownDatabase" property by calling setShutdownDatabase("shutdown")
method of data source. After setting this property, a call to
getConnection method of data source will shutdown the database. Hope
this helps.

This information is in
http://db.apache.org/derby/docs/dev/devguide/cdevresman19524.html

There is an example which shows use of "CreateDatabase" property. Use
of "ShutdownDatabase" property is similar to this. I had recently
reviewed this section of developer guide. As you are using Derby in
J2EE environment, it would be nice if you can also provide any
suggestions to improve this section of the documentation.

Thanks,
Deepa

Mime
View raw message