Browse Source

SPR-5764

+ improved JBoss LTW by using the proper class loader for loading reflection types
pull/23217/head
Costin Leau 15 years ago
parent
commit
c2e1f113f5
  1. 3
      org.springframework.context/src/main/java/org/springframework/instrument/classloading/jboss/JBossClassLoaderAdapter.java
  2. 3
      org.springframework.context/src/main/java/org/springframework/instrument/classloading/jboss/JBossLoadTimeWeaver.java

3
org.springframework.context/src/main/java/org/springframework/instrument/classloading/jboss/JBossClassLoaderAdapter.java

@ -71,6 +71,9 @@ class JBossClassLoaderAdapter { @@ -71,6 +71,9 @@ class JBossClassLoaderAdapter {
}
this.classLoader = clazzLoader;
// use the classloader that loaded the classloader to load
// the types for reflection purposes
classLoader = clazzLoader.getClass().getClassLoader();
// BaseClassLoader#getPolicy
Method method = clazzLoaderType.getDeclaredMethod(GET_POLICY);

3
org.springframework.context/src/main/java/org/springframework/instrument/classloading/jboss/JBossLoadTimeWeaver.java

@ -70,5 +70,4 @@ public class JBossLoadTimeWeaver implements LoadTimeWeaver { @@ -70,5 +70,4 @@ public class JBossLoadTimeWeaver implements LoadTimeWeaver {
public ClassLoader getThrowawayClassLoader() {
return new SimpleThrowawayClassLoader(getInstrumentableClassLoader());
}
}
}
Loading…
Cancel
Save