Class JakartaServletProcessApplication
- java.lang.Object
- 
- org.camunda.bpm.application.AbstractProcessApplication
- 
- org.camunda.bpm.application.impl.AbstractServletProcessApplication
- 
- org.camunda.bpm.application.impl.JakartaServletProcessApplication
 
 
 
- 
- All Implemented Interfaces:
- jakarta.servlet.ServletContextListener,- java.util.EventListener,- ProcessApplicationInterface
 
 public class JakartaServletProcessApplication extends AbstractServletProcessApplication implements jakarta.servlet.ServletContextListener A AbstractProcessApplicationImplementation to be used in a Servlet container environment.This class implements the ServletContextListenerinterface and can thus participate in the deployment lifecycle of your web application.UsageIn a Servlet 5.0 container it is sufficient adding a custom subclass of JakartaServletProcessApplicationannotated with@ProcessApplicationto your application:@ProcessApplication("Loan Approval App") public class LoanApprovalApplication extends ServletProcessApplication { // empty implementation }This, in combination with aMETA-INF/processes.xmlfile is sufficient for making sure that the process application class is picked up at runtime.Invocation SemanticsWhen the AbstractProcessApplication.execute(java.util.concurrent.Callable)method is invoked, the servlet process application modifies the context classloader of the current Thread to the classloader that loaded the application-provided subclass of this class. This allows- the process engine to resolve JavaDelegateimplementations using the classloader of the process application
- In apache tomcat this allows you to resolve Naming Resources (JNDI) form the naming context of the process application. JNDI name resolution is based on the TCCL in Apache Tomcat.
 Set TCCL of Process Application | | +--------------------+ | |Process Application | invoke v | | ProcessEngine -----------------O--|--> Java Delegate | | | | | +--------------------+Process Application ReferenceThe process engine holds a WeakReferenceto theJakartaServletProcessApplicationand does not cache any classes loaded using the Process Application classloader.
- 
- 
Field SummaryFields Modifier and Type Field Description protected jakarta.servlet.ServletContextservletContext- 
Fields inherited from class org.camunda.bpm.application.impl.AbstractServletProcessApplicationprocessApplicationClassloader, reference, servletContextName, servletContextPath
 - 
Fields inherited from class org.camunda.bpm.application.AbstractProcessApplicationdefaultDeployToEngineName, isDeployed, processApplicationBeanElResolver, processApplicationElResolver, processApplicationScriptEnvironment, variableSerializers
 
- 
 - 
Constructor SummaryConstructors Constructor Description JakartaServletProcessApplication()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcontextDestroyed(jakarta.servlet.ServletContextEvent sce)voidcontextInitialized(jakarta.servlet.ServletContextEvent sce)jakarta.servlet.ServletContextgetServletContext()protected java.lang.ClassLoaderinitProcessApplicationClassloader(jakarta.servlet.ServletContextEvent sce)- 
Methods inherited from class org.camunda.bpm.application.impl.AbstractServletProcessApplicationautodetectProcessApplicationName, getProcessApplicationClassloader, getProperties, getReference
 - 
Methods inherited from class org.camunda.bpm.application.AbstractProcessApplicationcreateDeployment, deploy, execute, execute, getBeanElResolver, getDefaultDeployToEngineName, getElResolver, getEnvironmentScripts, getExecutionListener, getName, getProcessApplicationScriptEnvironment, getRawObject, getScriptEngineForName, getTaskListener, getVariableSerializers, initProcessApplicationElResolver, setDefaultDeployToEngineName, setVariableSerializers, undeploy
 
- 
 
- 
- 
- 
Method Detail- 
contextInitializedpublic void contextInitialized(jakarta.servlet.ServletContextEvent sce) - Specified by:
- contextInitializedin interface- jakarta.servlet.ServletContextListener
 
 - 
initProcessApplicationClassloaderprotected java.lang.ClassLoader initProcessApplicationClassloader(jakarta.servlet.ServletContextEvent sce) 
 - 
contextDestroyedpublic void contextDestroyed(jakarta.servlet.ServletContextEvent sce) - Specified by:
- contextDestroyedin interface- jakarta.servlet.ServletContextListener
 
 - 
getServletContextpublic jakarta.servlet.ServletContext getServletContext() 
 
- 
 
-