Package org.apache.derby.drda

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


    public void stopNetworkServer() {
        try {
            NetworkServerControl networkServer =
                NetworkServerTestSetup.getNetworkServerControl();

            networkServer.shutdown();
            if (serverOutput != null) {
                serverOutput.close();
            }
        } catch(Exception e) {
            SQLException se = new SQLException("Error shutting down server");
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

       
        NetworkServerTestSetup.waitForServerStart(server);
        int sizeAfterPing = bos.size();
        assertTrue("Create log with start message", 0 < sizeAfterPing);       
       
        server.shutdown();

        // DERBY-5598: The shutdown command doesn't wait until the message has
        // been written before it returns. Give the message a little time (up
        // to half a minute) to propagate to the log.
        int sizeAfterShutDown = bos.size();
View Full Code Here

                .getByName(TestConfiguration.getCurrent().getHostName()),
                TestConfiguration.getCurrent().getPort());

        server.start(null);
        NetworkServerTestSetup.waitForServerStart(server);
        server.shutdown();

        //to show this is a right workflow.
        assertTrue(true);
    }
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

        try
        {
            NetworkServerControl server =
        new NetworkServerControl(InetAddress.getByName("localhost"),
                   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

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.