Package org.apache.derby.drda

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


                    new NetworkServerControl(InetAddress.getByName("localhost"), possiblePort);
                // Ping and wait for the network server to reply
                boolean started = false;

                try {
                    networkServer.ping();
                    // If ping throws no exception the server is running
                    started = true;
                } catch(Exception e) {        
                    failException = e;
                }
View Full Code Here


                    new NetworkServerControl(InetAddress.getByName("localhost"), possiblePort);
                // Ping and wait for the network server to reply
                boolean started = false;

                try {
                    networkServer.ping();
                    // If ping throws no exception the server is running
                    started = true;
                } catch(Exception e) {        
                    failException = e;
                }
View Full Code Here

        NetworkServerControl nsctrl = NetworkServerTestSetup.getNetworkServerControl();
        String derbySystemHome = getSystemProperty("derby.system.home");
        nsctrl.setTraceDirectory(derbySystemHome);
      
        nsctrl.trace(true);
        nsctrl.ping();
        assertTrue(fileExists(derbySystemHome+"/Server3.trace"));
        nsctrl.trace(false);
       
        // now try on a directory where we don't have permission
        // this won't actually cause a failure until we turn on tracing.
View Full Code Here

            fail("Should have gotten an exception turning on tracing");
        } catch (Exception e) {
            // expected exception
        }
        // make sure we can still ping
        nsctrl.ping();
   
                       
    }
   
    /**
 
View Full Code Here

    public void test_03_Ping() throws Exception
    {
        String currentHost = TestConfiguration.getCurrent().getHostName();
       
        NetworkServerControl nsctrl = NetworkServerTestSetup.getNetworkServerControl();
        nsctrl.ping();
       
        // Note:Cannot test ping with unknown host because it fails in
        // InetAddress.getByName()
       
        nsctrl = new NetworkServerControl(privInetAddressGetByName(currentHost), 9393);
View Full Code Here

        // Note:Cannot test ping with unknown host because it fails in
        // InetAddress.getByName()
       
        nsctrl = new NetworkServerControl(privInetAddressGetByName(currentHost), 9393);
        try {       
          nsctrl.ping();
          fail("Should not have been able to ping on port 9393");
        }catch (Exception e){
          // expected exception
        }
    }
View Full Code Here

        NetworkServerControl nsctrl =
                NetworkServerTestSetup.getNetworkServerControl();
        String traceDir = home + "/" + dbName + "_tracefiles_restr";
        nsctrl.setTraceDirectory(traceDir);
        nsctrl.trace(true);
        nsctrl.ping();
        nsctrl.trace(false);

        File traceDirF = new File(traceDir);

        checkAccessToOwner(
View Full Code Here

        NetworkServerControl nsctrl =
                NetworkServerTestSetup.getNetworkServerControl();
        String traceDir = home + "/" + dbName + "_tracefiles_lax";
        nsctrl.setTraceDirectory(traceDir);
        nsctrl.trace(true);
        nsctrl.ping();
        nsctrl.trace(false);

        File traceDirF = new File(traceDir);

        checkAccessToOwner(
View Full Code Here

            while (!started && retries > 0) {
                try {
                    // Sleep 1 second and then ping the network server
                    Thread.sleep(SLEEP_TIME);
                    networkServer.ping();

                    // If ping does not throw an exception the server has started
                    started = true;
                } catch(Exception e) {      
                    retries--;
View Full Code Here

        NetworkServerControl nsctrl = NetworkServerTestSetup.getNetworkServerControl();
        String derbySystemHome = getSystemProperty("derby.system.home");
        nsctrl.setTraceDirectory(derbySystemHome);
      
        nsctrl.trace(true);
        nsctrl.ping();
        assertTrue(fileExists(derbySystemHome+"/Server3.trace"));
        nsctrl.trace(false);
       
        // now try on a directory where we don't have permission
        // this won't actually cause a failure until we turn on tracing.
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.