PlugIn as the application is loaded, and by
BaseRequestProcessor
at the
beginning of a request, if the singletons are found to be missing.
- Author:
- David Tobey
Field Summary |
(package private) static org.apache.commons.logging.Log |
log
|
private javax.servlet.GenericServlet |
servlet
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
static org.apache.commons.logging.Log log
servlet
private javax.servlet.GenericServlet servlet
ConfigPlugIn
public ConfigPlugIn()
ConfigPlugIn
public ConfigPlugIn(org.apache.struts.action.ActionServlet servlet)
ConfigPlugIn
public ConfigPlugIn(javax.servlet.GenericServlet servlet)
getServlet
public javax.servlet.GenericServlet getServlet()
setServlet
public void setServlet(javax.servlet.GenericServlet servlet)
init
public void init(org.apache.struts.action.ActionServlet servlet,
org.apache.struts.config.ModuleConfig moduleConfig)
throws javax.servlet.ServletException
- Specified by:
init
in interface org.apache.struts.action.PlugIn
- Throws:
javax.servlet.ServletException
initializeAppSettings
public void initializeAppSettings()
- Creates an instance of
java.util.Properties
representing
application settings in the application scope. Reads in the properties
from the "/WEB-INF/classes/appSettings.properties" file, using AppUtils.loadProperties(java.lang.String, javax.servlet.ServletContext)
.
initializeAppComponents
public void initializeAppComponents()
throws javax.servlet.ServletException
- Creates an instance of
java.util.Properties
representing
component settings in the application scope. Component settings define
which classes implement the various application interfaces used by the
application's code. Reads in the properties from the
"/WEB-INF/classes/appComponents.properties" file, using AppUtils.loadProperties(java.lang.String, javax.servlet.ServletContext)
.
- Throws:
javax.servlet.ServletException
initializeDAOFactory
public void initializeDAOFactory()
- Creates a configured instance of
DAOFactory
in the
application scope.
If successful, the "daoFactory" attribute of the servlet context will
contain a DAOFactory
that allows the DAOs it creates to to
communicate with the database through Hibernate.
destroy
public void destroy()
- Close the Hibernate SessionFactory as the application shuts down.
- Specified by:
destroy
in interface org.apache.struts.action.PlugIn
processPreDatabaseUpgrades
public void processPreDatabaseUpgrades()
processPostDatabaseUpgrades
public void processPostDatabaseUpgrades()
processUpgrade2dot1
public void processUpgrade2dot1()
processUpgrade2dot2
public void processUpgrade2dot2()
processUpgrade2dot2dot5
public void processUpgrade2dot2dot5()
processUpgrade2dot3dot2
public void processUpgrade2dot3dot2()
processUpgrade2dot3dot5
public void processUpgrade2dot3dot5()
processUpgrade3dot0dot0
public void processUpgrade3dot0dot0()
saveComponents
public void saveComponents(java.util.Properties appComponents)
throws java.lang.Exception
- Saves a new set of properties to the
/WEB-INF/classes/appComponents.properties file.
- Parameters:
appComponents
- The new set of properties to be saved.
- Throws:
java.lang.Exception
Copyright © SoftSlate, LLC 20032005