Package org.apache.derby.drda

Examples of org.apache.derby.drda.NetworkServerControl.shutdown()


        try {
            System.out.println("Stopping Derby");
            System.setProperty("derby.drda.portNumber", port);
            System.setProperty("derby.drda.host", "localhost");
            NetworkServerControl server = new NetworkServerControl();
            server.shutdown();
            try {Thread.sleep(2000);} catch (Exception ignored) {}

        } catch (Exception e) {
            throw new BuildException(e.getMessage());
        }
View Full Code Here


      // Leave the connection open before shutdown to make
      // sure the thread closes down.
      // connection.close();
     
      System.out.println("getting ready to shutdown");
      serverControl.shutdown();
      Thread.sleep(5000);

        } catch (Exception e) {
      System.out.print("FAIL: Unexpected exception" + e.getMessage());
            e.printStackTrace();
View Full Code Here

     * Stop the network server
     */
    private void stopNetworkServer() {
        try {
            NetworkServerControl networkServer = new NetworkServerControl();
            networkServer.shutdown();
            if (serverOutput != null) {
                serverOutput.close();
            }
        } catch(Exception e) {
            System.out.println("INFO: Network server shutdown returned: " + e);
View Full Code Here

  private  void  bringDownServer()
    throws Exception
  {
    NetworkServerControl  controller = new NetworkServerControl();

    controller.shutdown();
  }
 
  /**
   * <p>
   * Set the system property which requests the network server to boot.
View Full Code Here

        try
        {
            NetworkServerControl server =
        new NetworkServerControl(InetAddress.getByName(hostName),
                   portNumber);
      server.shutdown();
            Thread.sleep(5000);
        }
        catch( Exception e)
        {
            System.out.println( "  Exception thrown while trying to shutdown the remote server.");
View Full Code Here

        try {
            System.out.println("Stopping Derby");
            System.setProperty("derby.drda.portNumber", port);
            System.setProperty("derby.drda.host", "localhost");
            NetworkServerControl server = new NetworkServerControl();
            server.shutdown();
            try {Thread.sleep(2000);} catch (Exception ignored) {}

        } catch (Exception e) {
            throw new BuildException(e.getMessage());
        }
View Full Code Here

                config.getPort(),
                config.getUserName(),
                config.getUserPassword());

            // shut down the server
            server.shutdown();
        } catch (Exception e) {
            if (!(e.getMessage().substring(0,17).equals("DRDA_InvalidValue")))
            {
                fail("unexpected error");
            }
View Full Code Here

       
        assertEquals("Network Server state incorrect",
                serverShouldBeUp, isServerUp);
       
        if (isServerUp)
            control.shutdown();
    }
   
    /**
     * Return true if a full auto-boot of the engine is expected
     * due to jdbc.drivers containing the name of the embedded driver.
View Full Code Here

     * Stop the network server
     */
    private void stopNetworkServer() {
        try {
            NetworkServerControl networkServer = new NetworkServerControl();
            networkServer.shutdown();
        } catch(Exception e) {
            System.out.println("INFO: Network server shutdown returned: " + e);
        }
    }

View Full Code Here

       
        assertEquals("Network Server state incorrect",
                serverShouldBeUp, isServerUp);
       
        if (isServerUp)
            control.shutdown();
    }
   
    /**
     * Return true if a full auto-boot of the engine is expected
     * due to jdbc.drivers containing the name of the embedded driver.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.