db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Van Couvering <da...@vancouvering.com>
Subject Determining when shutdown is complete.
Date Tue, 06 Apr 2010 17:53:33 GMT
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?


David W. Van Couvering


View raw message