|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.excalibur.component.servlet.AbstractReferenceProxyLatch
abstract class AbstractReferenceProxyLatch
Servlet containers do not have a guaranteed order in which servlets will be destroyed like there is with initialization. This means that the servlet which created and controls an object may be destroyed while other servlets are still using it. This presents a problem in environments where common objects are placed into the ServletContext and used by more than one servlet. To solve this problem an object is placed into the ServletContext wrapped in a ReferenceProxy. Whe nthe servlet is ready to be shutdown. This proxy latch is used to wait until all other servlets are done with the components before disposing them.
Field Summary | |
---|---|
private java.lang.String |
m_name
Deprecated. Name of the latch |
private boolean |
m_triggerRequested
Deprecated. Flag that keeps track of when the trigger is requested. |
private int |
m_waitingProxies
Deprecated. Number of registered proxies which have not yet been finalized. |
Constructor Summary | |
---|---|
AbstractReferenceProxyLatch()
Deprecated. Create a new ReferenceProxyLatch. |
Method Summary | |
---|---|
ReferenceProxy |
createProxy(java.lang.Object object,
java.lang.String name)
Deprecated. |
(package private) void |
notifyFinalized(AbstractReferenceProxy proxy)
Deprecated. Called by a proxy when it is finalized. |
void |
requestTrigger()
Deprecated. Request that the triggered() method be called by asking all of the proxies managed by the latch to notify that they are no longer accepting requests to reference their internal objects. |
abstract void |
triggered()
Deprecated. Called when all of the proxies have notified that they are done. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String m_name
private int m_waitingProxies
private boolean m_triggerRequested
Constructor Detail |
---|
public AbstractReferenceProxyLatch()
Method Detail |
---|
public ReferenceProxy createProxy(java.lang.Object object, java.lang.String name)
object
- Object to be protected.name
- Name of the object.
public void requestTrigger()
void notifyFinalized(AbstractReferenceProxy proxy)
proxy
- The AbstractRefernceProxy that is ready.public abstract void triggered() throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |