db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henrik Frisk" <fris...@gmail.com>
Subject Shutdown of embedded Derby server throws an SQLException?
Date Mon, 11 Feb 2008 21:24:17 GMT
Hi,

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 following call:

DriverManager.getConnection("jdbc:derby:;shutdown=true");

Now, I was just looking at the SimpleNetworkServerSample demo that comes
with the db-derby download and saw he following:

            try
            {
                // shutdown Derby Network Server
                DriverManager.getConnection("jdbc:derby:;shutdown=true");
            }
            catch(SQLException se)
            {
                //ignore se
            }

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 server with

System.setProperty("derby.drda.startNetworkServer","true");

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,

Henrik

Mime
View raw message