This is the normal behavior, which is
admittedly a little quirky. I suspect the rationale is that the method must
either return a valid connection, or throw an exception, and in this case only
the latter is possible. Personally, I’d rather have a utility method for
down, though one can easily write that using the current getConnection()
facility. However, one flaw that I see is that it doesn’t seem possible
to detect when shutdown fails.
From: Henrik Frisk
Sent: Monday, February 11, 2008
Subject: Shutdown of embedded Derby server throws an
I'm just starting to familiarize myself with the Derby Java API and I keep
getting an Exception when I'm trying to shut down an embedded server using the
Now, I was just looking at the SimpleNetworkServerSample demo that comes with
the db-derby download and saw he following:
shutdown Derby Network Server
The comment //ignore se made me think maybe it's normal it throws an Exception.
If not, what would be the right way to shut down the server? I'm starting the
and run it with the embedded driver. The db will run strictly on localhost and
I'm in control of the clients connecting to it.
Any hints would be greatly appreciated,