Author: remy.maucherat(a)jboss.com
Date: 2009-01-29 11:56:25 -0500 (Thu, 29 Jan 2009)
New Revision: 914
Modified:
trunk/java/org/apache/catalina/Loader.java
trunk/java/org/apache/catalina/loader/WebappLoader.java
Log:
- The loader repositories field (which seems a bit useless) seems a good place to expose
the real loading location (I prefer
avoiding using URLs to handle stuff if possible).
Modified: trunk/java/org/apache/catalina/Loader.java
===================================================================
--- trunk/java/org/apache/catalina/Loader.java 2009-01-27 10:36:32 UTC (rev 913)
+++ trunk/java/org/apache/catalina/Loader.java 2009-01-29 16:56:25 UTC (rev 914)
@@ -129,6 +129,13 @@
/**
+ * Return the set of loader repositories defined for this class loader.
+ * If none are defined, a zero-length array is returned.
+ */
+ public String[] findLoaderRepositories();
+
+
+ /**
* Add a property change listener to this component.
*
* @param listener The listener to add
Modified: trunk/java/org/apache/catalina/loader/WebappLoader.java
===================================================================
--- trunk/java/org/apache/catalina/loader/WebappLoader.java 2009-01-27 10:36:32 UTC (rev
913)
+++ trunk/java/org/apache/catalina/loader/WebappLoader.java 2009-01-29 16:56:25 UTC (rev
914)
@@ -441,6 +441,10 @@
return sb.toString();
}
+ public String[] findLoaderRepositories() {
+ return getLoaderRepositories();
+ }
+
public String[] getLoaderRepositories() {
if( loaderRepositories==null ) return null;
String res[]=new String[ loaderRepositories.size()];
@@ -941,7 +945,7 @@
// Adding the repository to the class loader
classLoader.addRepository(classesPath + "/", classRepository);
- loaderRepositories.add(classesPath + "/" );
+ loaderRepositories.add(classRepository.getAbsolutePath());
}
@@ -1016,7 +1020,7 @@
// in the dir
}
- loaderRepositories.add( filename );
+ loaderRepositories.add(destFile.getAbsolutePath());
}
} catch (NamingException e) {
Show replies by date