Package org.apache.derby.drda

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


     * 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


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

        // 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

      // Just connect, do something and close the connection
      connection = getConnection();
      Statement stmt = connection.createStatement();
      ResultSet rs = stmt.executeQuery("Select  tablename   from  sys.systables")
      JDBC.assertDrainResults(rs);
      serverControl.shutdown();
      Thread.sleep(5000);
    } catch (Exception e) {
      System.out.print("FAIL: Unexpected exception" + e.getMessage());
      e.printStackTrace();
    }
View Full Code Here

        try {
            if (specifyPort)
            {
                NetworkServerControl nsctrl =
                    NetworkServerTestSetup.getNetworkServerControl(port);
                nsctrl.shutdown();
            }
            else
            {
                NetworkServerControl nsctrl =
                    NetworkServerTestSetup.getNetworkServerControlDefault();
View Full Code Here

            }
            else
            {
                NetworkServerControl nsctrl =
                    NetworkServerTestSetup.getNetworkServerControlDefault();
                nsctrl.shutdown();
            }
        } catch (Exception e) {
            return "failed to shutdown server with API parameter (" + e + ")";
        }
        if (canPingServer(port,false)) {
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

       
        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

                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 {
            if (specifyPort)
            {
                NetworkServerControl nsctrl =
                    NetworkServerTestSetup.getNetworkServerControl(port);
                nsctrl.shutdown();
            }
            else
            {
                NetworkServerControl nsctrl =
                    NetworkServerTestSetup.getNetworkServerControlDefault();
View Full Code Here

            }
            else
            {
                NetworkServerControl nsctrl =
                    NetworkServerTestSetup.getNetworkServerControlDefault();
                nsctrl.shutdown();
            }
        } catch (Exception e) {
            return "failed to shutdown server with API parameter (" + e + ")";
        }
        if (canPingServer(port,false)) {
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.