axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r556428 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
Date Sun, 15 Jul 2007 17:01:40 GMT
Author: deepal
Date: Sun Jul 15 10:01:40 2007
New Revision: 556428

URL: http://svn.apache.org/viewvc?view=rev&rev=556428
Log:
getting module class path loading correctly 

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java?view=diff&rev=556428&r1=556427&r2=556428
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
Sun Jul 15 10:01:40 2007
@@ -30,10 +30,7 @@
 
 import java.io.File;
 import java.io.UnsupportedEncodingException;
-import java.net.URI;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.net.URLDecoder;
+import java.net.*;
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.HashMap;
@@ -114,11 +111,23 @@
         try {
             Enumeration moduleURLs = loader.getResources("META-INF/module.xml");
             while (moduleURLs.hasMoreElements()) {
-                URL url = (URL)moduleURLs.nextElement();
-                String fileName = url.toString();
-                fileName = fileName.substring(0, fileName.lastIndexOf("/META-INF/module.xml"));
-                File f = new File(new URI(fileName));
-                addFileToDeploy(f, deployer ,WSInfo.TYPE_MODULE);
+                try {
+                    URL url = (URL)moduleURLs.nextElement();
+                    String fileName = url.toString();
+                    if (fileName.startsWith("jar")) {
+                        url = ((java.net.JarURLConnection) url.openConnection()).getJarFileURL();
+                        fileName = url.toString();
+                         File f = new File(new URI(fileName));
+                        addFileToDeploy(f, deployer ,WSInfo.TYPE_MODULE);
+                    } else if (fileName.startsWith("file")) {
+                        fileName = fileName.substring(0, fileName.lastIndexOf("/META-INF/module.xml"));
+                        File f = new File(new URI(fileName));
+                        addFileToDeploy(f, deployer ,WSInfo.TYPE_MODULE);
+                    } 
+
+                } catch (URISyntaxException e) {
+                    log.info(e);
+                }
             }
         } catch (Exception e) {
             // Oh well, log the problem



---------------------------------------------------------------------
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