db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raymond Kroeker <raykroe...@gmail.com>
Subject Re: Determining when shutdown is complete.
Date Tue, 06 Apr 2010 18:08:55 GMT
I'm assuming you're shutting down the db via a
getConnection("...;shutdown") call.  After this is complete you are
shut down.

On Tue, Apr 6, 2010 at 10:53, 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?
> Thanks,
> David
> --
> David W. Van Couvering
> http://www.linkedin.com/in/davidvc
> http://davidvancouvering.blogspot.com
> http://twitter.com/dcouvering

Raymond Kroeker

View raw message