You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by David Van Couvering <da...@vancouvering.com> on 2010/04/22 21:37:50 UTC
Stopping NetworkServerControl
Sorry if this is obvious, but I can't seem to figure it out. I know how to
start a network listener for an embedded database:
new NetworkServerControl().start(writer);
but how do you stop it? There is no stop method on NetworkServerControl...
Thanks!
David
--
David W. Van Couvering
http://www.linkedin.com/in/davidvc
http://davidvancouvering.blogspot.com
http://twitter.com/dcouvering
Re: Stopping NetworkServerControl
Posted by Kathey Marsden <km...@sbcglobal.net>.
On 4/22/2010 12:37 PM, David Van Couvering wrote:
> Sorry if this is obvious, but I can't seem to figure it out. I know
> how to start a network listener for an embedded database:
>
> new NetworkServerControl().start(writer);
>
> but how do you stop it? There is no stop method on
> NetworkServerControl...
>
The method is shutdown() rather than stop
Re: Stopping NetworkServerControl
Posted by David Van Couvering <da...@gmail.com>.
Hm, I didn't see a "shutdown" method last time I looked. Oh, well, what do
you know, there it is! As usual, blind as a bat!
Thanks!
David
On Thu, Apr 22, 2010 at 10:56 PM, Knut Anders Hatlen <Kn...@sun.com>wrote:
> On 04/23/10 01:08, David Van Couvering wrote:
> > Hm, I don't want to shut down the database, it may be in use. I just
> > want to stop the network listener. Is that not possible?
>
> Hi David,
>
> NetworkServerControl.shutdown() only shuts down the network server. The
> databases will still be booted.
>
> There is one exception: If you started the network server from the
> command line, it will shut down the engine too. But in that case we know
> that the network server process is going to terminate, so no one will be
> able to access the databases in that process anyway.
>
> --
> Knut Anders
>
--
David W. Van Couvering
http://www.linkedin.com/in/davidvc
http://davidvancouvering.blogspot.com
http://twitter.com/dcouvering
Re: Stopping NetworkServerControl
Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
On 04/23/10 01:08, David Van Couvering wrote:
> Hm, I don't want to shut down the database, it may be in use. I just
> want to stop the network listener. Is that not possible?
Hi David,
NetworkServerControl.shutdown() only shuts down the network server. The
databases will still be booted.
There is one exception: If you started the network server from the
command line, it will shut down the engine too. But in that case we know
that the network server process is going to terminate, so no one will be
able to access the databases in that process anyway.
--
Knut Anders
Re: Stopping NetworkServerControl
Posted by David Van Couvering <da...@gmail.com>.
Hm, I don't want to shut down the database, it may be in use. I just want
to stop the network listener. Is that not possible?
David
2010/4/22 Máximo Castillo <ma...@gmail.com>
> You have to use something like this:
>
> if(embeddedConn != null)
> embeddedConn.close();
> try
> {
> // shutdown Derby Network Server
> *DriverManager.getConnection("jdbc:derby:;shutdown=true");*
> }
> catch(SQLException se)
> {
> //ignore se
> }
>
> Just create a connection with a "jdbc:derby:;shutdown=true" url
>
>
> Maximo
>
> On Thu, Apr 22, 2010 at 4:37 PM, David Van Couvering <
> david@vancouvering.com> wrote:
>
>> Sorry if this is obvious, but I can't seem to figure it out. I know how
>> to start a network listener for an embedded database:
>>
>> new NetworkServerControl().start(writer);
>>
>> but how do you stop it? There is no stop method on
>> NetworkServerControl...
>>
>> Thanks!
>>
>> David
>>
>> --
>> David W. Van Couvering
>>
>> http://www.linkedin.com/in/davidvc
>> http://davidvancouvering.blogspot.com
>> http://twitter.com/dcouvering
>>
>
>
--
David W. Van Couvering
http://www.linkedin.com/in/davidvc
http://davidvancouvering.blogspot.com
http://twitter.com/dcouvering
Re: Stopping NetworkServerControl
Posted by Máximo Castillo <ma...@gmail.com>.
You have to use something like this:
if(embeddedConn != null)
embeddedConn.close();
try
{
// shutdown Derby Network Server
*DriverManager.getConnection("jdbc:derby:;shutdown=true");*
}
catch(SQLException se)
{
//ignore se
}
Just create a connection with a "jdbc:derby:;shutdown=true" url
Maximo
On Thu, Apr 22, 2010 at 4:37 PM, David Van Couvering <david@vancouvering.com
> wrote:
> Sorry if this is obvious, but I can't seem to figure it out. I know how to
> start a network listener for an embedded database:
>
> new NetworkServerControl().start(writer);
>
> but how do you stop it? There is no stop method on NetworkServerControl...
>
> Thanks!
>
> David
>
> --
> David W. Van Couvering
>
> http://www.linkedin.com/in/davidvc
> http://davidvancouvering.blogspot.com
> http://twitter.com/dcouvering
>