|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.melati.poem.PoemDatabaseFactory.PoemShutdownThread
public static class PoemDatabaseFactory.PoemShutdownThread
Shutdown databases cleanly when JVM exits. This method is called in one of two ways: when the jvm exits or when a ServletContext is detroyed. Jetty, and presumably other servlet containers, registers its listeners as shutdown hooks too, so there is no way of determining which is to be executed first. If PoemDatabaseFactory has not been initialised before the ContextListener is activated then this thread will be created but will fail to register. It will then be run by the ContextListener. It may well be that the registered thread will be run before the ContextListener thread, or visa versa, so there is a synchronised variable to ensure it actually does something only the first time.
org.melati.servlet.PoemServletContextListener| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
PoemDatabaseFactory.PoemShutdownThread()
Constructor. |
|
| Method Summary | |
|---|---|
void |
run()
|
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PoemDatabaseFactory.PoemShutdownThread()
| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablerun in class java.lang.ThreadThread.run()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||