public class DbStarter extends Object implements ServletContextListener
Constructor and Description |
---|
DbStarter() |
Modifier and Type | Method and Description |
---|---|
void |
contextDestroyed(ServletContextEvent servletContextEvent)
Receives notification that the ServletContext is about to be
shut down.
|
void |
contextInitialized(ServletContextEvent servletContextEvent)
Receives notification that the web application initialization
process is starting.
|
Connection |
getConnection()
Get the connection.
|
public void contextInitialized(ServletContextEvent servletContextEvent)
ServletContextListener
All ServletContextListeners are notified of context initialization before any filters or servlets in the web application are initialized.
contextInitialized
in interface ServletContextListener
servletContextEvent
- the ServletContextEvent containing the ServletContext
that is being initializedpublic Connection getConnection()
public void contextDestroyed(ServletContextEvent servletContextEvent)
ServletContextListener
All servlets and filters will have been destroyed before any ServletContextListeners are notified of context destruction.
contextDestroyed
in interface ServletContextListener
servletContextEvent
- the ServletContextEvent containing the ServletContext
that is being destroyedCopyright © 2012 JBoss by Red Hat. All Rights Reserved.