db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald McLean <dmclea...@gmail.com>
Subject Re: Determining when shutdown is complete.
Date Tue, 06 Apr 2010 18:07:08 GMT
Are you talking about embedded Derby databases? If you are, the
shutdown always raises an exception when it finishes.

Otherwise, perhaps some more details would be a good idea.


On Tue, Apr 6, 2010 at 1:53 PM, David Van Couvering
<david@vancouvering.com> wrote:
> Hi, all.
> In my application environment I am using multiple databases, and when I have
> no users of the database, I need to shut it down, or I can run out of memory
> or open files (I am maintaining a lot of databases).
> But this is a multithreaded environment, and I could have another thread
> immediately attempt to connect to the a database that is in the process of
> shutting down.
> Is there a way for me to find out when shutdown is complete, so I can block
> other threads from trying to connect until the job is done?  I suppose I
> could just poll, trying to open a new connection and catching exceptions,
> until it stops failing, but is there a better way?
Family photographs are a critical legacy for
ourselves and our descendants. Protect that
legacy with a digital backup and recovery plan.

Join the photo preservation advocacy Facebook group:

View raw message