Examples of WatchdogServiceImpl


Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

    /* -- Test constructor -- */

    @Test public void testConstructor() throws Exception {
  DataService dataService = null;
        WatchdogServiceImpl watchdog = null;
        try {
      dataService = createDataService(serviceProps);
            watchdog = new WatchdogServiceImpl(
    serviceProps, systemRegistry, txnProxy, dummyShutdownCtrl)
        } finally {
      if (dataService != null) dataService.shutdown();
            if (watchdog != null) watchdog.shutdown();
        }
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

        }
    }

    @Test(expected = NullPointerException.class)
    public void testConstructorNullProperties() throws Exception {
        WatchdogServiceImpl watchdog = null;
  try {
      watchdog = new WatchdogServiceImpl(null, systemRegistry, txnProxy,
                 dummyShutdownCtrl);
  } finally {
            if (watchdog != null) watchdog.shutdown();
        }
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

        }
    }

    @Test(expected = NullPointerException.class)
    public void testConstructorNullRegistry() throws Exception {
        WatchdogServiceImpl watchdog = null;
  try {
      watchdog = new WatchdogServiceImpl(serviceProps, null, txnProxy,
                 dummyShutdownCtrl);
  } finally {
            if (watchdog != null) watchdog.shutdown();
        }
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

        }
    }

    @Test(expected = NullPointerException.class)
    public void testConstructorNullProxy() throws Exception {
        WatchdogServiceImpl watchdog = null;
  try {
      watchdog =
                    new WatchdogServiceImpl(serviceProps, systemRegistry, null,
              dummyShutdownCtrl);
  } finally {
            if (watchdog != null) watchdog.shutdown();
        }
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

        }
    }
   
    @Test(expected = NullPointerException.class)
    public void testConstructorNullShutdownCtrl() throws Exception {
        WatchdogServiceImpl watchdog = null;
        try {
            watchdog = new WatchdogServiceImpl(serviceProps, systemRegistry,
                 txnProxy, null);
        } finally {
            if (watchdog != null) {
                watchdog.shutdown();
            }
        }
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

    @Test(expected = IllegalArgumentException.class)
    public void testConstructorNoAppName() throws Exception {
        Properties properties = createProperties(
            WatchdogServerPropertyPrefix + ".port", "0");
  new WatchdogServiceImpl(properties, systemRegistry, txnProxy,
        dummyShutdownCtrl);
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

        int port = watchdogService.getServer().getPort();
  Properties props = createProperties(
      StandardProperties.APP_NAME, "TestWatchdogServiceImpl",
            StandardProperties.NODE_TYPE, NodeType.appNode.name(),
      WatchdogServerPropertyPrefix + ".port", Integer.toString(port));
  new WatchdogServiceImpl(props, systemRegistry, txnProxy,
        dummyShutdownCtrl);
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

        dummyShutdownCtrl);
    }
   
    @Test(expected = IllegalArgumentException.class)
    public void testConstructorNegativePort() throws Exception {
        WatchdogServiceImpl watchdog = null;
  Properties properties = createProperties(
      StandardProperties.APP_NAME, "TestWatchdogServiceImpl",
      WatchdogServerPropertyPrefix + ".port", Integer.toString(-1));
  try {
      watchdog =
                new WatchdogServiceImpl(properties, systemRegistry, txnProxy,
          dummyShutdownCtrl);
  } finally {
            if (watchdog != null) watchdog.shutdown();
        }
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

        }
    }

    @Test(expected = IllegalArgumentException.class)
    public void testConstructorPortTooLarge() throws Exception {
        WatchdogServiceImpl watchdog = null;
  Properties properties = createProperties(
      StandardProperties.APP_NAME, "TestWatchdogServiceImpl",
      WatchdogServerPropertyPrefix + ".port", Integer.toString(65536));
  try {
      watchdog =
                new WatchdogServiceImpl(properties, systemRegistry, txnProxy,
          dummyShutdownCtrl);
  } finally {
            if (watchdog != null) watchdog.shutdown();
        }
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

    @Test(expected = IllegalArgumentException.class)
    public void testConstructorStartServerRenewIntervalTooSmall()
  throws Exception
    {
        WatchdogServiceImpl watchdog = null;
  Properties properties = createProperties(
      StandardProperties.APP_NAME, "TestWatchdogServiceImpl",
            StandardProperties.NODE_TYPE, NodeType.coreServerNode.name(),
      WatchdogServerPropertyPrefix + ".port", "0",
      WatchdogServerPropertyPrefix + ".renew.interval", "0");
  try {
      watchdog =
                new WatchdogServiceImpl(properties, systemRegistry, txnProxy,
          dummyShutdownCtrl);
  } finally {
            if (watchdog != null) watchdog.shutdown();
        }
    }
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.