META-INF/processes.xml
file is sufficient for making sure that the process application class is picked up at runtime. In a Servlet 2.5 container, the process application can be added as a web listener to your project's web.xml
{@literal <}?xml version="1.0" encoding="UTF-8"? {@literal >}{@literal <}web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" {@literal >}{@literal <}listener {@literal >}{@literal <}listener-class {@literal >}org.my.project.MyProcessApplication {@literal <}/listener-class {@literal >}{@literal <}/listener {@literal >}{@literal <}/web-app {@literal >}
When the {@link #execute(java.util.concurrent.Callable)} method is invoked, the servlet processapplication modifies the context classloader of the current Thread to the classloader that loaded the application-provided subclass of this class. This allows
Set TCCL of Process Application | | +--------------------+ | |Process Application | invoke v | | ProcessEngine -----------------O--|--> Java Delegate | | | | | +--------------------+
The process engine holds a {@link WeakReference} to the {@link ServletProcessApplication} and does not cache anyclasses loaded using the Process Application classloader.
@author Daniel Meyer @author Thorben Lindhauer
|
|