public class CloseAwareApplicationContext
extends GenericApplicationContext
| Constructor and Description |
|---|
CloseAwareApplicationContext(java.lang.String name) |
CloseAwareApplicationContext(java.lang.String uid,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doClose()
Custom implementation that tries to solve our problems with event dispatching from multiple threads when the
context is closing.
|
void |
publishEvent(ApplicationEvent event)
We do not allow to dispatch events once the closing is in progress.
|
java.lang.String |
toString() |
public CloseAwareApplicationContext(java.lang.String name)
public CloseAwareApplicationContext(java.lang.String uid,
java.lang.String name)
public void publishEvent(ApplicationEvent event)
protected void doClose()
publishEvent(ApplicationEvent)
method. We do not want to close Spring Context immediately then, since this might lead to different Spring-related
errors. What we do: When there are any such threads, we wait for them to finish. If the threads won't finish
pending calls within given timeout, we continue with closing. The timeout value is fixed as TIMEOUT_LOOP_COUNT *
SLEEP_TIME milliseconds.public java.lang.String toString()
Copyright © 2018 SAP SE. All Rights Reserved.