axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r640148 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment: DeploymentClassLoader.java DeploymentEngine.java util/Utils.java
Date Sun, 23 Mar 2008 03:25:30 GMT
Author: dims
Date: Sat Mar 22 20:25:29 2008
New Revision: 640148

URL: http://svn.apache.org/viewvc?rev=640148&view=rev
Log:
Part of fix for AXIS2-3650 - Need a scrub for J2S doPriv

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java?rev=640148&r1=640147&r2=640148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java
Sat Mar 22 20:25:29 2008
@@ -43,8 +43,6 @@
     // List of jar files inside the jars in the original url
     private List embedded_jars;
 
-    private HashMap loadedClass = new HashMap();
-
     /**
      * DeploymentClassLoader is extended from URLClassLoader. The constructor
      * does not override the super constructor, but takes in an addition list of

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java?rev=640148&r1=640147&r2=640148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
Sat Mar 22 20:25:29 2008
@@ -1061,9 +1061,7 @@
             throws AxisFault {
         try {
             DeploymentFileData currentDeploymentFile = new DeploymentFileData(serviceFile,
null);
-            DeploymentClassLoader classLoader = new DeploymentClassLoader(new URL[]{serviceFile.toURL()},
-                                                                          new ArrayList(),
-                                                                          Thread.currentThread().getContextClassLoader());
+            DeploymentClassLoader classLoader = Utils.createClassLoader(serviceFile);
             currentDeploymentFile.setClassLoader(classLoader);
             AxisServiceGroup serviceGroup = new AxisServiceGroup();
             serviceGroup.setServiceGroupClassLoader(classLoader);
@@ -1087,7 +1085,6 @@
             throw new DeploymentException(e);
         }
     }
-
 
     public File getServicesDir() {
         return servicesDir;

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java?rev=640148&r1=640147&r2=640148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
Sat Mar 22 20:25:29 2008
@@ -741,7 +741,13 @@
         excludeList.add("shutDown");
     }
 
-	public static ClassLoader createClassLoader(ArrayList urls,
+    public static DeploymentClassLoader createClassLoader(File serviceFile) throws MalformedURLException
{
+        return createDeploymentClassLoader(new URL[]{serviceFile.toURL()},
+                Thread.currentThread().getContextClassLoader(),
+                new ArrayList());
+    }
+
+    public static ClassLoader createClassLoader(ArrayList urls,
 			ClassLoader serviceClassLoader, boolean extractJars, File tmpDir) {
 		URL url = (URL) urls.get(0);
 		if (extractJars) {
@@ -750,9 +756,8 @@
 				urls.remove(0);
 				urls.addAll(0, Arrays.asList(urls1));
 				URL[] urls2 = (URL[]) urls.toArray(new URL[urls.size()]);
-				return new DeploymentClassLoader(urls2, null,
-						serviceClassLoader);
-			} catch (Exception e) {
+                return createDeploymentClassLoader(urls2, serviceClassLoader, null);
+            } catch (Exception e) {
 				log
 						.warn("Exception extracting jars into temporary directory : "
 								+ e.getMessage()
@@ -762,9 +767,8 @@
 		}
 		List embedded_jars = Utils.findLibJars(url);
 		URL[] urls2 = (URL[]) urls.toArray(new URL[urls.size()]);
-		return new DeploymentClassLoader(urls2, embedded_jars,
-				serviceClassLoader);
-	}
+        return createDeploymentClassLoader(urls2, serviceClassLoader, embedded_jars);
+    }
 
 	public static File toFile(URL url) throws UnsupportedEncodingException {
 	    String path = URLDecoder.decode(url.getPath(), defaultEncoding);



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


Mime
View raw message