com.softslate.commerce.customer.core
Class ConfigPlugIn

java.lang.Object
  extended bycom.softslate.commerce.customer.core.ConfigPlugIn
All Implemented Interfaces:
org.apache.struts.action.PlugIn

public class ConfigPlugIn
extends java.lang.Object
implements org.apache.struts.action.PlugIn

Initializes singleton objects in the application scope. Called by Struts as a 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  org.apache.struts.action.ActionServlet servlet
           
 
Constructor Summary
ConfigPlugIn()
           
 
Method Summary
 void destroy()
           
 org.apache.struts.action.ActionServlet getServlet()
           
 void init(org.apache.struts.action.ActionServlet servlet, org.apache.struts.config.ModuleConfig moduleConfig)
           
 void initializeDAOFactory()
          Creates a configured instance of DAOFactory in the application scope.
 void setServlet(org.apache.struts.action.ActionServlet servlet)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

static org.apache.commons.logging.Log log

servlet

private org.apache.struts.action.ActionServlet servlet
Constructor Detail

ConfigPlugIn

public ConfigPlugIn()
Method Detail

getServlet

public org.apache.struts.action.ActionServlet getServlet()

setServlet

public void setServlet(org.apache.struts.action.ActionServlet 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

initializeDAOFactory

public void initializeDAOFactory()
Creates a configured instance of DAOFactory in the application scope. Sets the moduleListString of the DAOFactory and calls its initialize() method.

If successful, the "daoFactory" attribute of the servlet context will contain a DAOFactory that allows the DAOs it creates to implement connection pooling, and that has loaded all of the application's SQL statements into memory.


destroy

public void destroy()
Specified by:
destroy in interface org.apache.struts.action.PlugIn


Copyright © SoftSlate, Inc. 2003–2005