org.opensubsystems.core.www
Class DatabaseContextListener

java.lang.Object
  extended by org.opensubsystems.core.www.DatabaseContextListener
All Implemented Interfaces:
java.util.EventListener, javax.servlet.ServletContextListener

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

DatabaseContextListener is responsible for initialization of database access layer for the web application. It determines what database schemas are used by this web application, loads them and initialize them and then initialize and starts the database access. The database schemas to must be specified in web.xml using context parameters for example: database.schema.0 org.opensubsystems.user.data.UserDatabaseSchema database.schema.1 org.opensubsystems.session.data.SessionDatabaseSchema database.schema.2 org.opensubsystems.security.data.RoleDatabaseSchema

Version:
$Id: DatabaseContextListener.java,v 1.8 2007/01/07 06:14:09 bastafidli Exp $
Author:
Miro Halas
Code reviewer:
Miro Halas
Code reviewed:
1.5 2006/04/20 13:59:45 bastafidli

Field Summary
static java.lang.String DATABASE_SCHEMA_PREFIX
          This configuration setting is used to name parameters such as oss.database.schema.0, oss.database.schema.1 which specify what database schemas the application consists of.
 
Constructor Summary
DatabaseContextListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)
          
 void contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATABASE_SCHEMA_PREFIX

public static final java.lang.String DATABASE_SCHEMA_PREFIX
This configuration setting is used to name parameters such as oss.database.schema.0, oss.database.schema.1 which specify what database schemas the application consists of. The database schemas are initialized in the numeric order specified in the configuration setting name after all dependencies exposed by the individual database schemas are taken into account.

See Also:
Constant Field Values
Constructor Detail

DatabaseContextListener

public DatabaseContextListener()
Method Detail

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)

Specified by:
contextInitialized in interface javax.servlet.ServletContextListener

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)

Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener


Copyright © 2003 - 2006 OpenSubsystems s.r.o.