Class AbstractLeakPreventer
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.util.preventers.AbstractLeakPreventer
-
- All Implemented Interfaces:
LifeCycle
- Direct Known Subclasses:
AppContextLeakPreventer
,AWTLeakPreventer
,DOMLeakPreventer
,DriverManagerLeakPreventer
,GCThreadLeakPreventer
,Java2DLeakPreventer
,LDAPLeakPreventer
,LoginConfigurationLeakPreventer
,SecurityProviderLeakPreventer
public abstract class AbstractLeakPreventer extends AbstractLifeCycle
AbstractLeakPreventer Abstract base class for code that seeks to avoid pinning of webapp classloaders by using the jetty classloader to proactively call the code that pins them (generally pinned as static data members, or as static data members that are daemon threads (which use the context classloader)). Instances of subclasses of this class should be set with Server.addBean(), which will ensure that they are called when the Server instance starts up, which will have the jetty classloader in scope.
-
-
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
-
-
Constructor Summary
Constructors Constructor Description AbstractLeakPreventer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
doStart()
abstract void
prevent(java.lang.ClassLoader loader)
-
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, toString
-
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
-
-
Method Detail
-
prevent
public abstract void prevent(java.lang.ClassLoader loader)
-
doStart
protected void doStart() throws java.lang.Exception
- Overrides:
doStart
in classAbstractLifeCycle
- Throws:
java.lang.Exception
-
-