Title: [waffle-scm] [797] trunk/waffle-core/src/main/java/org/codehaus/waffle/context: Cleanup javadocs.

Diff

Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/context/WaffleContextListener.java (796 => 797)

--- trunk/waffle-core/src/main/java/org/codehaus/waffle/context/WaffleContextListener.java	2008-08-28 23:53:00 UTC (rev 796)
+++ trunk/waffle-core/src/main/java/org/codehaus/waffle/context/WaffleContextListener.java	2008-08-29 00:09:47 UTC (rev 797)
@@ -14,8 +14,8 @@
 import javax.servlet.http.HttpSessionListener;
 
 /**
- * Abstract context and session listener that uses a Waffle ComponentRegistry to 
- * retrieve the ContextContainerFactory used to manage the components registered at each webapp scope.
+ * Abstract context and session listener that uses a Waffle ComponentRegistry to retrieve the ContextContainerFactory
+ * used to manage the components registered at each webapp scope.
  * 
  * @author Mike Ward
  * @author Mauro Talevi
@@ -24,15 +24,14 @@
     private ContextContainerFactory contextContainerFactory;
 
     /**
-     * The ServletContext is being initialized Waffle needs to instantiate a Waffle ComponentRegistry
-     * and register to the ServletContext so that it will be avcilable through out.  Next the Waffle
-     * ContextManager is retreived from the componentRegistry and the initialize message is delegated
-     * to it.
+     * As the servlet context is being initialized Waffle needs to instantiate a component registry and add it to the
+     * context so that it will be available through out. Next the Waffle context container factory is retrieved from the
+     * registry and initialized with the servlet context.
      */
     public void contextInitialized(ServletContextEvent servletContextEvent) {
         ServletContext servletContext = servletContextEvent.getServletContext();
 
-        // build instance and register it with the ServletContext
+        // build component registry instance and add it to the ServletContext
         ComponentRegistry componentRegistry = buildComponentRegistry(servletContext);
         servletContext.setAttribute(ComponentRegistry.class.getName(), componentRegistry);
 
@@ -41,32 +40,38 @@
     }
 
     /**
-     * The servlet context is being destroyed it is time to cleanup.
+     * As the servlet context is being destroyed, the context container factory is also destroyed.
      */
     public void contextDestroyed(ServletContextEvent servletContextEvent) {
         contextContainerFactory.destroy();
     }
 
+    /**
+     * As the session is created a session-level context container is also created and started.
+     */
     public void sessionCreated(HttpSessionEvent httpSessionEvent) {
         HttpSession session = httpSessionEvent.getSession();
-
         ContextContainer sessionContextContainer = contextContainerFactory.buildSessionLevelContainer();
         sessionContextContainer.registerComponentInstance(session);
         session.setAttribute(Constants.SESSION_CONTAINER_KEY, sessionContextContainer);
         sessionContextContainer.start();
     }
 
+    /**
+     * As the session is created the session-level context container is also stopped and disposed.
+     */
     public void sessionDestroyed(HttpSessionEvent httpSessionEvent) {
         HttpSession session = httpSessionEvent.getSession();
-
-        ContextContainer sessionContextContainer = (ContextContainer) session.getAttribute(Constants.SESSION_CONTAINER_KEY);
+        ContextContainer sessionContextContainer = (ContextContainer) session
+                .getAttribute(Constants.SESSION_CONTAINER_KEY);
         sessionContextContainer.stop();
         sessionContextContainer.dispose();
     }
 
     /**
      * Concrete subclasses to provide a Waffle ComponentRegistry instance
-     * @param servletContext 
+     * 
+     * @param servletContext
      * @return A ComponentRegistry
      */
     protected abstract ComponentRegistry buildComponentRegistry(ServletContext servletContext);

Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/context/pico/PicoContextContainerFactory.java (796 => 797)

--- trunk/waffle-core/src/main/java/org/codehaus/waffle/context/pico/PicoContextContainerFactory.java	2008-08-28 23:53:00 UTC (rev 796)
+++ trunk/waffle-core/src/main/java/org/codehaus/waffle/context/pico/PicoContextContainerFactory.java	2008-08-29 00:09:47 UTC (rev 797)
@@ -24,6 +24,8 @@
 import javax.servlet.http.HttpSession;
 
 /**
+ * PicoContainer-based implementation of context container factory.
+ * 
  * @author Michael Ward
  * @author Mauro Talevi
  */
@@ -80,8 +82,7 @@
     protected Registrar createRegistrar(ContextContainer contextContainer) {
         MutablePicoContainer delegateContainer = (MutablePicoContainer) contextContainer.getDelegate();
         Registrar registrar = new PicoRegistrar(delegateContainer, parameterResolver, picoLifecycleStrategy, registrarMonitor, picoComponentMonitor);
-        getContextMonitor().registrarCreated(registrar, registrarMonitor);
-        
+        getContextMonitor().registrarCreated(registrar, registrarMonitor);        
         return registrar;
     }
 


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to