shared
Class WebappListener

java.lang.Object
  extended by shared.WebappListener
All Implemented Interfaces:
java.util.EventListener, javax.servlet.ServletContextListener

public class WebappListener
extends java.lang.Object
implements javax.servlet.ServletContextListener

A servlet context listener for closing the database connections and database drivers. The listener will be called before the web application is removed from memory.


Constructor Summary
WebappListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent sce)
          When the web applcation is removed from memory, close Hibernate and remove the drivers.
 void contextInitialized(javax.servlet.ServletContextEvent sce)
          The method that is called when the web application is loaded into memory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebappListener

public WebappListener()
Method Detail

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent sce)
The method that is called when the web application is loaded into memory. There is nothing to do in this method, but it must be declared, since it is part of the interface.

Specified by:
contextInitialized in interface javax.servlet.ServletContextListener
Parameters:
sce - The servlet context event

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent sce)
When the web applcation is removed from memory, close Hibernate and remove the drivers.

Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener
Parameters:
sce - The servlet context event