org.camunda.bpm.application.impl.ServletProcessApplication Java Examples

The following examples show how to use org.camunda.bpm.application.impl.ServletProcessApplication. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MscRuntimeContainerDelegate.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
protected void deployServletProcessApplication(ServletProcessApplication processApplication) {

  ClassLoader contextClassloader = ClassLoaderUtil.getContextClassloader();
  String moduleName = ((ModuleClassLoader)contextClassloader).getModule().getIdentifier().toString();

  ServiceName serviceName = ServiceNames.forNoViewProcessApplicationStartService(moduleName);
  ServiceName paModuleService = ServiceNames.forProcessApplicationModuleService(moduleName);

  if(serviceContainer.getService(serviceName) == null) {

    ServiceController<ServiceTarget> requiredService = (ServiceController<ServiceTarget>) serviceContainer.getRequiredService(paModuleService);

    NoViewProcessApplicationStartService service = new NoViewProcessApplicationStartService(processApplication.getReference());
    requiredService.getValue()
      .addService(serviceName, service)
      .setInitialMode(Mode.ACTIVE)
      .install();

  }
}
 
Example #2
Source File: MscRuntimeContainerDelegate.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
protected void deployServletProcessApplication(ServletProcessApplication processApplication) {

  ClassLoader contextClassloader = ClassLoaderUtil.getContextClassloader();
  String moduleName = ((ModuleClassLoader)contextClassloader).getModule().getIdentifier().toString();

  ServiceName serviceName = ServiceNames.forNoViewProcessApplicationStartService(moduleName);
  ServiceName paModuleService = ServiceNames.forProcessApplicationModuleService(moduleName);

  if(serviceContainer.getService(serviceName) == null) {

    ServiceController<ServiceTarget> requiredService = (ServiceController<ServiceTarget>) serviceContainer.getRequiredService(paModuleService);

    NoViewProcessApplicationStartService service = new NoViewProcessApplicationStartService(processApplication.getReference());
    requiredService.getValue()
      .addService(serviceName, service)
      .setInitialMode(Mode.ACTIVE)
      .install();

  }
}
 
Example #3
Source File: SpringProcessApplicationElResolver.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
public ELResolver getElResolver(AbstractProcessApplication processApplication) {
  
  if (processApplication instanceof SpringProcessApplication) {
    SpringProcessApplication springProcessApplication = (SpringProcessApplication) processApplication;
    return new ApplicationContextElResolver(springProcessApplication.getApplicationContext());
    
  } else if (processApplication instanceof ServletProcessApplication) {
    ServletProcessApplication servletProcessApplication = (ServletProcessApplication) processApplication;
    
    if(!ClassUtils.isPresent("org.springframework.web.context.support.WebApplicationContextUtils", processApplication.getProcessApplicationClassloader())) {
      LOGGER.log(Level.FINE, "WebApplicationContextUtils must be present for SpringProcessApplicationElResolver to work");
      return null;
    }
    
    ServletContext servletContext = servletProcessApplication.getServletContext();
    WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);
    if(applicationContext != null) {
      return new ApplicationContextElResolver(applicationContext);
    }
    
  }
  
  LOGGER.log(Level.FINE, "Process application class {0} unsupported by SpringProcessApplicationElResolver", processApplication);    
  return null;
}
 
Example #4
Source File: MscRuntimeContainerDelegate.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public void deployProcessApplication(AbstractProcessApplication processApplication) {
  if(processApplication instanceof ServletProcessApplication) {
    deployServletProcessApplication((ServletProcessApplication)processApplication);
  }
}
 
Example #5
Source File: MscRuntimeContainerDelegate.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public void deployProcessApplication(AbstractProcessApplication processApplication) {
  if(processApplication instanceof ServletProcessApplication) {
    deployServletProcessApplication((ServletProcessApplication)processApplication);
  }
}