@Override public void init() throws ServletException { super.init(); ParameterContext pc = new ServletConfigParameterContext(getServletConfig(), true); String mappings = pc.getString("wsddBeanNamespaceMappings", ""); initNamespaceMappings(mappings); this.defaultLoaders = ServicesUtil.getServiceFactoryLoaders(getClass()); updateServiceDeployment(); }
@Override protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { ServiceContext sc = new ServletServiceContext(req, new ArrayList<RpcHeader>()); currentServletConfig.set(sc); currentServiceLoader.set(new ServiceLoader(sc, getDefaultServiceFactoryLoaders())); try { if ((60 * 1000) <= (System.currentTimeMillis() - lastUpdate)) { updateServiceDeployment(); } else { String serviceName = SGJavaProvider.getServiceName(sc); if (serviceName != null && getEngine(this).getService(serviceName) == null) { updateServiceDeployment(); } } super.service(req, resp); } finally { currentServiceLoader.remove(); currentServletConfig.remove(); } }