org.apache.openejb
Class ClassLoaderUtil
java.lang.Object
org.apache.openejb.ClassLoaderUtil
public class ClassLoaderUtil
- extends java.lang.Object
- Version:
- $Revision: 948987 $ $Date: 2010-05-27 22:55:12 +0200 (Do, 27. Mai 2010) $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassLoaderUtil
public ClassLoaderUtil()
getContextClassLoader
public static java.lang.ClassLoader getContextClassLoader()
createClassLoader
public static java.net.URLClassLoader createClassLoader(java.lang.String appId,
java.net.URL[] urls,
java.lang.ClassLoader parent)
destroyClassLoader
public static void destroyClassLoader(java.lang.ClassLoader classLoader)
destroyClassLoader
public static void destroyClassLoader(java.lang.String appId)
createTempClassLoader
public static java.net.URLClassLoader createTempClassLoader(java.lang.ClassLoader parent)
createTempClassLoader
public static java.net.URLClassLoader createTempClassLoader(java.lang.String appId,
java.net.URL[] urls,
java.lang.ClassLoader parent)
clearClassLoaderCaches
public static void clearClassLoaderCaches()
- Cleans well known class loader leaks in VMs and libraries. There is a lot of bad code out there and this method
will clear up the know problems. This method should only be called when the class loader will no longer be used.
It this method is called two often it can have a serious impact on preformance.
clearSunJarFileFactoryCache
public static void clearSunJarFileFactoryCache(java.lang.String jarLocation)
clearSunSoftCache
public static void clearSunSoftCache(java.lang.Class clazz,
java.lang.String fieldName)
- Clears the caches maintained by the SunVM object stream implementation. This method uses reflection and
setAccessable to obtain access to the Sun cache. The cache is locked with a synchronize monitor and cleared.
This method completely clears the class loader cache which will impact preformance of object serialization.
- Parameters:
clazz
- the name of the class containing the cache fieldfieldName
- the name of the cache field
cleanOpenJPACache
public static void cleanOpenJPACache(java.lang.ClassLoader classLoader)
Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.