Thanks for your responses! I'll give that a shot, putting a barrier around creating new connections until shutdown completes.
David On Tue, Apr 6, 2010 at 11:08 AM, Raymond Kroeker <[email protected]>wrote: > 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 > <[email protected]> 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 > -- David W. Van Couvering http://www.linkedin.com/in/davidvc http://davidvancouvering.blogspot.com http://twitter.com/dcouvering
