1 64 65 package com.jcorporate.expresso.services.asyncprocess; 66 67 import org.apache.log4j.Logger; 68 69 import javax.servlet.ServletConfig ; 70 import javax.servlet.ServletException ; 71 import javax.servlet.http.HttpServlet ; 72 73 74 82 public class AsyncServlet extends HttpServlet { 83 private static final Logger log = Logger.getLogger(AsyncServlet.class); 84 85 88 protected ProcessorFactory factory; 89 90 93 public AsyncServlet() { 94 } 95 96 99 public void destroy() { 100 factory.destroy(); 101 } 102 103 109 public void init(ServletConfig parm1) throws ServletException { 110 try { 111 factory = new ProcessorFactory(new DefaultAsyncProcessor()); 112 } catch (Throwable ex) { 113 log.error("Error initializing async processor. Processing disabled", 114 ex); 115 } 116 } 117 } 118 | Popular Tags |