You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2007/04/16 21:29:16 UTC

svn commit: r529373 - /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/HandlerResolverImpl.java

Author: dims
Date: Mon Apr 16 12:29:15 2007
New Revision: 529373

URL: http://svn.apache.org/viewvc?view=rev&rev=529373
Log:
Use context class loader and not system class loader

Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/HandlerResolverImpl.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/HandlerResolverImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/HandlerResolverImpl.java?view=diff&rev=529373&r1=529372&r2=529373
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/HandlerResolverImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/HandlerResolverImpl.java Mon Apr 16 12:29:15 2007
@@ -217,8 +217,7 @@
 
     private static Class loadClass(String clazz) throws ClassNotFoundException {
         try {
-            // TODO: review:  necessary to use static method getSystemClassLoader in this class?
-            return forName(clazz, true, ClassLoader.getSystemClassLoader());
+            return forName(clazz, true, getContextClassLoader());
         } catch (ClassNotFoundException e) {
             throw e;
         }
@@ -253,14 +252,14 @@
 
 
     /** @return ClassLoader */
-    private static ClassLoader getSystemClassLoader() {
+    private static ClassLoader getContextClassLoader() {
         // NOTE: This method must remain private because it uses AccessController
         ClassLoader cl = null;
         try {
             cl = (ClassLoader)AccessController.doPrivileged(
                     new PrivilegedExceptionAction() {
                         public Object run() throws ClassNotFoundException {
-                            return ClassLoader.getSystemClassLoader();
+                            return Thread.currentThread().getContextClassLoader();
                         }
                     }
             );
@@ -268,7 +267,7 @@
             if (log.isDebugEnabled()) {
                 log.debug("Exception thrown from AccessController: " + e);
             }
-            throw (RuntimeException)e.getException();
+            throw ExceptionFactory.makeWebServiceException(e.getException());
         }
 
         return cl;



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org