public class ProcessToolRegistryContextLoader implements ServletContextListener {
@Override
public void contextInitialized(ServletContextEvent sce) {
try {
ProcessToolRegistryImpl toolRegistry = new ProcessToolRegistryImpl();
toolRegistry.commitModelExtensions();
toolRegistry.setBpmDefinitionLanguage("bpmn20");
toolRegistry.setProcessToolContextFactory(new ActivitiContextFactoryImpl(toolRegistry));
sce.getServletContext().setAttribute(ProcessToolRegistry.class.getName(), toolRegistry);
RegistryHolder.setRegistry(toolRegistry);
} catch (Exception e) {
Logger.getLogger(ProcessToolRegistryContextLoader.class.getName()).log(Level.SEVERE, e.getMessage(), e);