On 9/7/06, Susan L. Cline <[EMAIL PROTECTED]> 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