Package org.rioproject.opstring

Examples of org.rioproject.opstring.OperationalStringManager.decrement()


            ServiceBeanInstance[] instances =
                cybernode.getServiceBeanInstances(opstring.getServices()[0]);
            Assert.assertEquals(1, instances.length);
            Simple simple = (Simple)instances[0].getService();
            Assert.assertEquals("Hello visitor : 1", simple.hello("hi"));
            mgr.decrement(instances[0], true, true);
            ServiceMonitor<Simple> sMon =
                new ServiceMonitor<Simple>(testManager.getServiceDiscoveryManager(), Simple.class);
            sMon.waitFor(0);
            instances =
                cybernode.getServiceBeanInstances(opstring.getServices()[0]);
View Full Code Here


    private void decrementOnFailedAdvertiseLifecycle() {
        if(context!=null) {
            OperationalStringManager manager = context.getServiceBeanManager().getOperationalStringManager();
            try {
                manager.decrement(context.getServiceBeanManager().getServiceBeanInstance(),
                                  true,
                                  true);
                logger.debug("Decremented {}, the instance will not be re-allocated", clientName);
            } catch (Exception e1) {
                logger.warn("Unable to remove service {}/{}:{} instance from OperationalStringManager",
View Full Code Here

        logger.debug("Decrement service {}", getNameForLogging(serviceElement));
        try {
            ServiceBeanInstance[] instances = opMgr.getServiceBeanInstances(serviceElement);
            if(instances.length>0) {
                ServiceBeanInstance instance = instances[instances.length-1];
                opMgr.decrement(instance, true, true);
            }
        } catch (Throwable t) {
            logger.warn("While trying to get the decrement {}", serviceName, t);
        }
    }
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.