Package org.apache.openejb.server.control

Examples of org.apache.openejb.server.control.StandaloneServer.kill()


            logger.info("Asserting balance");
            assertBalance(bean, services.get().size());

            logger.info("Shutting down " + name);
            server.kill();
            services.remove(serverURI);
        }

        logger.info("All Servers Shutdown");
View Full Code Here


            // Invoke BLUE a few times
            invoke(bean, 10, "blue");

            // Kill BLUE
            blue.kill();

            // Invocations should now fail (and not failover)
            try {
                bean.name();
                Assert.fail("Server should be down and failover not hooked up");
View Full Code Here

            // Invoke GREEN a few times
            invoke(bean, 10, "green");

            // Kill GREEN
            green.kill();

            // Invocations should now failover to RED
            invoke(bean, 10, "red");
        }
    }
View Full Code Here

            // Invoke BLUE a few times
            invoke(bean, 10, "blue");

            // Kill BLUE
            blue.kill();

            // Invocations should now fail (and not failover)
            try {
                bean.name();
                Assert.fail("Server should be down and failover not hooked up");
View Full Code Here

            // Invoke GREEN a few times
            invoke(bean, 10, "green");

            // Kill GREEN
            green.kill();

            // Invocations should now failover to RED
            invoke(bean, 10, "red");
        }
    }
View Full Code Here

            // Invoke BLUE a few times
            invoke(bean, 10, "blue");

            // Kill BLUE
            blue.kill();

            // Invocations should now fail (and not failover)
            try {
                bean.name();
                Assert.fail("Server should be down and failover not hooked up");
View Full Code Here

            // Invoke GREEN a few times
            invoke(bean, 10, "green");

            // Kill GREEN
            green.kill();

            // Invocations should now failover to RED
            invoke(bean, 10, "red");
        }
    }
View Full Code Here

            logger.info("Asserting balance");
            assertBalance(bean, services.get().size());

            logger.info("Shutting down " + name);
            server.kill();
            services.remove(serverURI);
        }

        logger.info("All Servers Shutdown");
View Full Code Here

        final InitialContext context = new InitialContext(environment);
        final Calculator bean = (Calculator) context.lookup("CalculatorBeanRemote");

        for (final StandaloneServer server : servers) {
            System.out.println(String.format("Average invocation time %s microseconds", invoke(bean, 10000)));
            server.kill();
        }

        System.out.println("All servers destroyed");

        try {
View Full Code Here

    public static void afterClass() {

        for (final Map.Entry<String, StandaloneServer> entry : servers.entrySet()) {
            try {
                final StandaloneServer server = entry.getValue();
                server.kill();
            } catch (final Throwable t) {
                //Ignore
            }
        }
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.