Package org.apache.hivemind

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


        calculator.add(123);
       
       
        // Shutdown the registry, to make sure the JMX server is shutdown
       
        registry.shutdown();
    }

}
View Full Code Here


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

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

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

        connection.setDoOutput(true);
        connection.connect();
        InputStream inputStream = connection.getInputStream();
        assertTrue(inputStream.read() != 0);

        registry.shutdown();
    }

    public void testJsr160Connector() throws Exception
    {
        Registry registry = buildFrameworkRegistry("testConnectors.xml");
View Full Code Here

        verifyControls();

        assertTrue("start method has not been called", ((MBeanTestService) mBean1).isStartCalled());

        registry.shutdown();
    }

    /**
     * Tests the handling of a not compliant mbean
     */
 
View Full Code Here

        List l = (List) r.getConfiguration("hivemind.test.config.Simple");

        assertEquals(2, l.size());

        r.shutdown();

        try
        {
            l.size();
        }
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

        Registry registry = buildFrameworkRegistry("ShutdownListenerServices.xml");
        Simple simple = (Simple) registry.getService("hivemind.lib.test."
                + type + "Simple", Simple.class);
        final Counter counter = new Counter();
        simple.setCounter(counter);
        registry.shutdown();
        assertEquals(1, counter.getValue());
    }

    public void testPooled() throws Exception
    {
View Full Code Here

        verifyControls();

        assertTrue("start method has not been called", ((MBeanTestService) mBean1).isStartCalled());

        registry.shutdown();
    }

    /**
     * Tests the handling of a not compliant mbean
     */
 
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

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.