Package org.apache.hivemind

Examples of org.apache.hivemind.Registry.shutdown()


    public void testRegistryShutdownUnrepeatable() throws Exception
    {
        Registry r = buildFrameworkRegistry(new SimpleModule());

        r.shutdown();

        try
        {
            r.getConfiguration("foo.bar");
            unreachable();
View Full Code Here


            assertExceptionSubstring(ex, "The HiveMind Registry has been shutdown.");
        }

        try
        {
            r.shutdown();
            unreachable();
        }
        catch (ApplicationRuntimeException ex)
        {
            assertExceptionSubstring(ex, "The HiveMind Registry has been shutdown.");
View Full Code Here

        h.setValue("fred");

        assertEquals("fred", h.getValue());

        r.shutdown();

        try
        {
            h.getValue();
            unreachable();
View Full Code Here

        s.run();

        assertLoggedMessage("run -- singleton");

        r.shutdown();

        assertLoggedMessage("registryDidShutdown -- singleton");
    }

    public void testPrimitiveCore() throws Exception
View Full Code Here

        s.run();

        assertLoggedMessage("run -- primitive");

        r.shutdown();

        assertLoggedMessage("registryDidShutdown -- primitive");
    }

    /**
 
View Full Code Here

        ObjectName objectName = objectNameBuilder.createObjectName(logger.getName(), "logger");

        ObjectInstance instance = mbeanServer.getObjectInstance(objectName);
        assertNotNull(instance);

        registry.shutdown();
    }
}
View Full Code Here

    public static void main(String[] args)
    {
        Registry registry = ExampleUtils.buildRegistry("panorama.xml");
       
        registry.shutdown();
    }
}
View Full Code Here

        System.out.println("Add:      " + calculator.add(arg0, arg1));
        System.out.println("Subtract: " + calculator.subtract(arg0, arg1));
        System.out.println("Multiply: " + calculator.multiply(arg0, arg1));
        System.out.println("Divide:   " + calculator.divide(arg0, arg1));
       
        registry.shutdown();
    }
}
View Full Code Here

        // Alternately, we should create a WeakReference based monitor that shuts down the
        // old registry when it is no longer used by any other threads. For the moment,
        // this functionality is limited to development-time only (not production), so it isn't
        // urgent.

        oldRegistry.shutdown();
    }

    /**
     * Cleanup the thread, ignoring any exceptions that may be thrown.
     */
 
View Full Code Here

        Reverser r = (Reverser) reg.getService(name, Reverser.class);

        assertEquals("DNIMEVIH", r.reverse("HIVEMIND"));
        // Call reverse a second time to check for HIVEMIND-118
        r.reverse("HIVEMIND");
        reg.shutdown();

        try
        {
            r.reverse("SHUTDOWN");
            unreachable();
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.