Package org.apache.derby.drda

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


            int retries = 10;         // Max retries = max seconds to wait
            while (!started && retries > 0) {
                try {
                    // Sleep 1 second and then ping the network server
          Thread.sleep(1000);
                    networkServer.ping();

                    // If ping does not throw an exception the server has started
                    started = true;
                } catch(Exception e) {
                    System.out.println("INFO: ping returned: " + e);
View Full Code Here


    boolean          isUp = false;
   
    for ( int i = 0; i < PING_COUNT; i++ )
    {
      try {
        controller.ping();
        isUp = true;
        println( "Network server came up!" );
       
        break;
      }
View Full Code Here

   
   

        while (waitTime < timeToWait) {
            try {
                derbyServer.ping();
                return;
            } catch (Exception e) {
        Thread currentThread = Thread.currentThread();
        synchronized (currentThread) {
                    try {
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 testPing() 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

            int retries = 10;         // Max retries = max seconds to wait
            while (!started && retries > 0) {
                try {
                    // Sleep 1 second and then ping the network server
          Thread.sleep(1000);
                    networkServer.ping();

                    // If ping does not throw an exception the server has started
                    started = true;
                } catch(Exception e) {
                    System.out.println("INFO: ping returned: " + e);
View Full Code Here

            int retries = 10;         // Max retries = max seconds to wait
            while (!started && retries > 0) {
                try {
                    // Sleep 1 second and then ping the network server
          Thread.sleep(1000);
                    networkServer.ping();

                    // If ping does not throw an exception the server has started
                    started = true;
                } catch(Exception e) {
                    System.out.println("INFO: ping returned: " + e);
View Full Code Here

   
   

        while (waitTime < timeToWait) {
            try {
                derbyServer.ping();
                return;
            } catch (Exception e) {
        Thread currentThread = Thread.currentThread();
        synchronized (currentThread) {
                    try {
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.