|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.figure8.join.util.ConnectionKeeperLauncher
public class ConnectionKeeperLauncher
This a launcher for ConnectionKeeper threads implemented as a
ServletContextListener
.
Field Summary | |
---|---|
static java.lang.String |
HSQL_KEEPER_KEY
Key used for registring the ConnectionKeeper within ServletContext |
static int |
NB_CONNECTIONS
Number of connections to keep open by ConnectionKeeper |
static long |
SLEEP_TIME
Sleeping time of the ConnectionKeeper |
Constructor Summary | |
---|---|
ConnectionKeeperLauncher()
Creates a new instance of ConnectionKeeperLauncher |
Method Summary | |
---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)
Method called when context is destroyed |
void |
contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
Methad called when context is intialized. |
static boolean |
startConnectionKeeperIfNecessary()
Start a ConnectionKeeper thread only if necessary (ie. keeper has not already been started and database dialect is the one corresponding to Hypersonic SQL DB) |
static boolean |
stopConnectionKeeperIfNecessary()
Stop a ConnectionKeeper thread only if necessary (ie. a keeper already exists !) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NB_CONNECTIONS
public static final long SLEEP_TIME
public static final java.lang.String HSQL_KEEPER_KEY
Constructor Detail |
---|
public ConnectionKeeperLauncher()
Method Detail |
---|
public static boolean startConnectionKeeperIfNecessary()
public static boolean stopConnectionKeeperIfNecessary()
public void contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
contextInitialized
in interface javax.servlet.ServletContextListener
servletContextEvent
- Event received when context is initializedpublic void contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)
contextDestroyed
in interface javax.servlet.ServletContextListener
servletContextEvent
- The event corresponding to context desctruction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |