db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <home4...@pacbell.net>
Subject Re: Using Apache DBCP and Tomcat with Derby - database shutdown?
Date Thu, 07 Sep 2006 21:56:02 GMT
Hi Deepa,
Thanks a lot for your help.  That worked like a charm.
So I have now changed my code to this:
----- Original Message ----
From: Deepa Remesh <dremesh@gmail.com>
To: Derby Discussion <derby-user@db.apache.org>
Sent: Thursday, September 7, 2006 9:54:08 AM
Subject: Re: Using Apache DBCP and Tomcat with Derby - database shutdown?

On 9/7/06, Susan L. Cline <home4slc@pacbell.net> wrote:
> But this does not seem correct because I'm obtaining the connections to Derby via the
> 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

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.


View raw message