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 de...@apache.org on 2007/04/03 18:23:19 UTC

svn commit: r525199 - /webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java

Author: deepal
Date: Tue Apr  3 09:23:18 2007
New Revision: 525199

URL: http://svn.apache.org/viewvc?view=rev&rev=525199
Log:
fixing class loading issue .
getResource as stream always return parent resource , if it is there

Modified:
    webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java

Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java?view=diff&rev=525199&r1=525198&r2=525199
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java Tue Apr  3 09:23:18 2007
@@ -29,6 +29,7 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
+import java.util.HashMap;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 
@@ -39,6 +40,8 @@
     // List of jar files inside the jars in the original url
     private ArrayList embedded_jars;
 
+    private HashMap loadedClass = new HashMap();
+
     /**
      * DeploymentClassLoader is extended from URLClassLoader. The constructor
      * does not override the super constructor, but does additional steps like find out
@@ -256,5 +259,17 @@
         public InputStream getInputStream() {
             return new ByteArrayInputStream(bytes);
         }
+    }
+
+    public InputStream getResourceAsStream(String name) {
+        URL url =findResource(name);
+        if(url!=null){
+            try {
+                return url.openStream();
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
+        }
+        return null;
     }
 }



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