Package org.rioproject.monitor.service

Examples of org.rioproject.monitor.service.ServiceProvisionContext


            b.append("doDeploy ").append(numAllowed).append(" [");
            b.append(LoggingUtil.getLoggingName(req)).append("] instances");

            for (int i = 0; i < numAllowed; i++) {
                ProvisionRequest request = ProvisionRequest.copy(req);
                ServiceProvisionContext spc = getServiceProvisionContext();
                long nextID = (changeInstanceID ?
                               request.getInstanceIDMgr().getNextInstanceID() : currentID);
                if(changeInstanceID)
                    logger.warn("[{}] Changing instanceID", LoggingUtil.getLoggingName(request));
                request.setServiceElement(ServiceElementUtil.prepareInstanceID(request.getServiceElement(),
                                                                               true,
                                                                               nextID));
                logger.trace("[{}] instanceID : {}",
                             LoggingUtil.getLoggingName(request),
                             request.getServiceElement().getServiceBeanConfig().getInstanceID());
                spc.getInProcess().add(request.getServiceElement());
                spc.setProvisionRequest(request);
                spc.setServiceResource(resource);
                spc.getProvisioningPool().execute(new ProvisionTask(spc, null));
            }
            logger.debug(b.toString());
        }
        return (numAllowed);
    }
View Full Code Here


        sr = context.getSelector().filterIsolated(request, sr);
        return sr.length != 0;
    }

    public ServiceProvisionContext getServiceProvisionContext() {
        return new ServiceProvisionContext(context.getSelector(),
                                           context.getProvisioningPool(),
                                           context.getInProcess(),
                                           context.getEventSource(),
                                           context.getWatch(),
                                           context.getDispatcher(),
View Full Code Here

TOP

Related Classes of org.rioproject.monitor.service.ServiceProvisionContext

Copyright © 2018 www.massapicom. 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.