You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ho...@apache.org on 2007/05/10 17:45:46 UTC
svn commit: r536890 -
/geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java
Author: hogstrom
Date: Thu May 10 08:45:42 2007
New Revision: 536890
URL: http://svn.apache.org/viewvc?view=rev&rev=536890
Log:
Modified ClassLoader behaviour to only use JarFile ClassLoader if specifically requested. If not specifically requested we'll only use it on Windows for now given the slight performance penalty.
Modified:
geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java
Modified: geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java?view=diff&rev=536890&r1=536889&r2=536890
==============================================================================
--- geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java (original)
+++ geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Configuration.java Thu May 10 08:45:42 2007
@@ -361,15 +361,25 @@
log.debug(buf.toString());
}
- if (Boolean.getBoolean("Xorg.apache.geronimo.OldClassLoader")) {
- return new MultiParentClassLoader(environment.getConfigId(),
+ // The JarFileClassLoader was created to address a locking problem seen only on Windows platforms.
+ // It carries with it a slight performance penalty that needs to be addressed. Rather than make
+ // *nix OSes carry this burden we'll engage the JarFileClassLoader for Windows or if the user
+ // specifically requests it. We'll look more at this issue in the future.
+ boolean useJarFileClassLoader = false;
+ if (System.getProperty("Xorg.apache.geronimo.JarFileClassLoader") == null) {
+ useJarFileClassLoader = System.getProperty("os.name").startsWith("Windows");
+ } else {
+ useJarFileClassLoader = Boolean.getBoolean("Xorg.apache.geronimo.JarFileClassLoader");
+ }
+ if (useJarFileClassLoader) {
+ return new JarFileClassLoader(environment.getConfigId(),
urls,
parentClassLoaders,
environment.isInverseClassLoading(),
hiddenClasses,
nonOverridableClasses);
} else {
- return new JarFileClassLoader(environment.getConfigId(),
+ return new MultiParentClassLoader(environment.getConfigId(),
urls,
parentClassLoaders,
environment.isInverseClassLoading(),