org.jbpm.web.CloseJbpmConfigurationServlet Maven / Gradle / Ivy
The newest version!
package org.jbpm.web;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import org.jbpm.JbpmConfiguration;
/**
*
* Closes the jBPM configuration on destruction.
*
* Servlet context parameters
*
*
* Name
* Description
* Default value
*
*
* jbpm.configuration.resource
* classpath resource containing the jBPM configuration
* jbpm.cfg.xml
*
*
*
* @deprecated Replaced by {@link org.jbpm.web.JbpmConfigurationCloser}
*/
public class CloseJbpmConfigurationServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
private String configurationName;
public void init() throws ServletException {
configurationName = getServletContext().getInitParameter("jbpm.configuration.resource");
}
public void destroy() {
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance(configurationName);
jbpmConfiguration.close();
}
}