Package org.camunda.bpm.container.impl.spi

Examples of org.camunda.bpm.container.impl.spi.PlatformServiceContainer


  public String getName() {
    return "start "+serviceName;
  }

  public void performOperationStep(DeploymentOperation operationContext) {
    final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();

    serviceContainer.startService(serviceName, service);
  }
View Full Code Here


  public String getName() {
    return "stop "+serviceName;
  }

  public void performOperationStep(DeploymentOperation operationContext) {
    final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();

    serviceContainer.stopService(serviceName);
  }
View Full Code Here

    return "Stop managed job acquisitions";
  }

  public void performOperationStep(DeploymentOperation operationContext) {

    final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();

    Set<String> jobExecutorServiceNames = serviceContainer.getServiceNames(ServiceTypes.JOB_EXECUTOR);

    for (String serviceName : jobExecutorServiceNames) {
      try {
        serviceContainer.stopService(serviceName);
      } catch(Exception e) {
        LOGGER.log(Level.WARNING, "Exception while stopping job executor service: "+e.getMessage(), e);
      }
    }
View Full Code Here

    return "Deploy Job Executor Thread Pool";
  }

  public void performOperationStep(DeploymentOperation operationContext) {

    final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();

    // TODO: read these values from JobExecutorXml properties
    int queueSize = 3;
    int corePoolSize = 3;
    int maxPoolSize = 10;

    // initialize Queue & Executor services
    BlockingQueue<Runnable> threadPoolQueue = new ArrayBlockingQueue<Runnable>(queueSize);

    ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(corePoolSize, maxPoolSize, 0L, TimeUnit.MILLISECONDS, threadPoolQueue);
    threadPoolExecutor.setRejectedExecutionHandler(new ThreadPoolExecutor.AbortPolicy());

    // construct the service for the thread pool
    JmxManagedThreadPool managedThreadPool = new JmxManagedThreadPool(threadPoolQueue, threadPoolExecutor);

    // install the service into the container
    serviceContainer.startService(ServiceTypes.BPM_PLATFORM, RuntimeContainerDelegateImpl.SERVICE_NAME_EXECUTOR, managedThreadPool);

  }
View Full Code Here

    return "Deployment of process archive '"+processArchive.getName();
  }

  public void performOperationStep(DeploymentOperation operationContext) {

    final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();
    final AbstractProcessApplication processApplication = operationContext.getAttachment(Attachments.PROCESS_APPLICATION);
    final ClassLoader processApplicationClassloader = processApplication.getProcessApplicationClassloader();

    ProcessEngine processEngine = getProcessEngine(serviceContainer);
View Full Code Here

    LOGGER.log(Level.INFO, builder.toString());
  }

  public void cancelOperationStep(DeploymentOperation operationContext) {

    final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();

    ProcessEngine processEngine = getProcessEngine(serviceContainer);

    // if a registration was performed, remove it.
    if(deployment != null && deployment.getProcessApplicationRegistration() != null) {
View Full Code Here

    return "Removing process application";
  }

  public void performOperationStep(DeploymentOperation operationContext) {
   
    final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();
    final AbstractProcessApplication processApplication = operationContext.getAttachment(Attachments.PROCESS_APPLICATION);   
   
    // remove the service
    serviceContainer.stopService(ServiceTypes.PROCESS_APPLICATION, processApplication.getName());
  }
View Full Code Here

    return "Stopping process applications";
  }

  public void performOperationStep(DeploymentOperation operationContext) {
   
    final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();
    List<JmxManagedProcessApplication> processApplicationsReferences = serviceContainer.getServiceValuesByType(ServiceTypes.PROCESS_APPLICATION);
   
    for (JmxManagedProcessApplication processApplication : processApplicationsReferences) {
      stopProcessApplication(processApplication.getProcessApplicationReference());     
    }
View Full Code Here

    return parameters.toArray();
  }

  public static ProcessApplicationInfo getProcessApplicationInfo(DeploymentOperation operationContext) {
   
    final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();   
    final AbstractProcessApplication processApplication = operationContext.getAttachment(Attachments.PROCESS_APPLICATION);
   
    JmxManagedProcessApplication managedPa = serviceContainer.getServiceValue(ServiceTypes.PROCESS_APPLICATION, processApplication.getName());
    return managedPa.getProcessApplicationInfo();
  }
View Full Code Here

    return managedPa.getProcessApplicationInfo();
  }

  public static List<ProcessEngine> getProcessEngines(DeploymentOperation operationContext) {
   
    final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();   
    final ProcessApplicationInfo processApplicationInfo = getProcessApplicationInfo(operationContext);
     
    List<ProcessEngine> processEngines = new ArrayList<ProcessEngine>();   
    for (ProcessApplicationDeploymentInfo deploymentInfo : processApplicationInfo.getDeploymentInfo()) {
      String processEngineName = deploymentInfo.getProcessEngineName();    
      processEngines.add((ProcessEngine) serviceContainer.getServiceValue(ServiceTypes.PROCESS_ENGINE, processEngineName));     
    }
   
    return processEngines;
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.container.impl.spi.PlatformServiceContainer

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.