Author: adrianc
Date: Fri Aug 7 15:20:24 2009
New Revision: 802043
URL:
http://svn.apache.org/viewvc?rev=802043&view=revLog:
WebDavServlet.java now uses the cached ClassLoader.
Modified:
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/webdav/WebDavServlet.java
Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/webdav/WebDavServlet.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/webdav/WebDavServlet.java?rev=802043&r1=802042&r2=802043&view=diff==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/webdav/WebDavServlet.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/webdav/WebDavServlet.java Fri Aug 7 15:20:24 2009
@@ -30,6 +30,7 @@
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
+import org.ofbiz.base.util.CachedClassLoader;
import org.ofbiz.base.util.Debug;
import org.ofbiz.entity.GenericDelegator;
import org.ofbiz.security.Security;
@@ -62,6 +63,8 @@
public void init(ServletConfig config) throws ServletException{
try {
super.init(config);
+ ClassLoader loader = new CachedClassLoader(Thread.currentThread().getContextClassLoader(), null);
+ Thread.currentThread().setContextClassLoader(loader);
ServletContext context = this.getServletContext();
String delegatorName = context.getInitParameter("entityDelegatorName");
this.delegator = GenericDelegator.getGenericDelegator(delegatorName);
@@ -70,7 +73,6 @@
this.security = SecurityFactory.getInstance(this.delegator);
this.authz = AuthorizationFactory.getInstance(this.delegator);
String factoryClassName = context.getInitParameter("requestHandlerFactoryClass");
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
this.handlerFactory = (RequestHandlerFactory) loader.loadClass(factoryClassName).newInstance();
} catch (Exception e) {
Debug.logError(e, "Error while initializing WebDAV servlet: ", module);