GWTApplication.server
Class DBCPoolingListener
java.lang.Object
GWTApplication.server.DBCPoolingListener
- All Implemented Interfaces:
- java.util.EventListener, javax.servlet.ServletContextListener
public class DBCPoolingListener
- extends java.lang.Object
- implements javax.servlet.ServletContextListener
This is a class which will be called by Tomcat when the servlet for
the fault database is loaded by the container and will result in
the database connection pool being initialised. The servlet when
connecting to the database will use a connection from the database
pool so as to accelerate the database access.
- Version:
- $Id: DBCPoolingListener.java,v 1.3 2008/01/15 11:08:15 cb Exp $
- Author:
- Craige Bevil
Method Summary |
void |
contextDestroyed(javax.servlet.ServletContextEvent sce)
|
void |
contextInitialized(javax.servlet.ServletContextEvent sce)
This is called when the fault database context is created in
the servlet and serves to initialise the database pool intended
to be used by the fault management system in the tomcat
servlet. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DBCPoolingListener
public DBCPoolingListener()
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent sce)
- This is called when the fault database context is created in
the servlet and serves to initialise the database pool intended
to be used by the fault management system in the tomcat
servlet. It looks up the data source in the tomcat container
which will provide the handle through which we will get
database connections.
The configuration data for the pool (pertinent to the fault management system) is stored within the tomcat configuration data.
- Specified by:
contextInitialized
in interface javax.servlet.ServletContextListener
- Parameters:
sce
- This is the details of the servlet context event.
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
- Specified by:
contextDestroyed
in interface javax.servlet.ServletContextListener