Class GCThreadLeakPreventer
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.util.preventers.AbstractLeakPreventer
-
- org.eclipse.jetty.util.preventers.GCThreadLeakPreventer
-
- All Implemented Interfaces:
LifeCycle
public class GCThreadLeakPreventer extends AbstractLeakPreventer
GCThreadLeakPreventer Prevents a call to sun.misc.GC.requestLatency pinning a webapp classloader by calling it with a non-webapp classloader. The problem appears to be that when this method is called, a daemon thread is created which takes the context classloader. A known caller of this method is the RMI impl. See http://stackoverflow.com/questions/6626680/does-java-garbage-collection-log-entry-full-gc-system-mean-some-class-called This preventer will start the thread with the longest possible interval, although subsequent calls can vary that. Recommend to only use this class if you're doing RMI. Inspired by Tomcat JreMemoryLeakPrevention.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
-
Field Summary
-
Fields inherited from class org.eclipse.jetty.util.preventers.AbstractLeakPreventer
LOG
-
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING
-
-
Constructor Summary
Constructors Constructor Description GCThreadLeakPreventer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
prevent(ClassLoader loader)
-
Methods inherited from class org.eclipse.jetty.util.preventers.AbstractLeakPreventer
doStart
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, doStop, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
-
-
-
-
Method Detail
-
prevent
public void prevent(ClassLoader loader)
- Specified by:
prevent
in classAbstractLeakPreventer
- See Also:
AbstractLeakPreventer.prevent(java.lang.ClassLoader)
-
-