You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by st...@apache.org on 2002/08/14 11:13:43 UTC

cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl SlideRepository.java

stephan     2002/08/14 02:13:43

  Modified:    src/scratchpad/src/org/apache/cocoon/components/repository/impl
                        SlideRepository.java
  Log:
  Lifecycle methods from the Slide Domain supported.
  
  Revision  Changes    Path
  1.4       +23 -2     xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl/SlideRepository.java
  
  Index: SlideRepository.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl/SlideRepository.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SlideRepository.java	2 Aug 2002 09:21:00 -0000	1.3
  +++ SlideRepository.java	14 Aug 2002 09:13:43 -0000	1.4
  @@ -57,6 +57,7 @@
   
   import org.apache.avalon.excalibur.xml.Parser;
   //import org.apache.avalon.framework.activity.Initializable;
  +import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
  @@ -94,7 +95,7 @@
    * @version $Id$
    */
   public class SlideRepository implements Repository, ThreadSafe, 
  -                                        Composable, Configurable, LogEnabled/*, Initializable*/ {
  +                                        Composable, Configurable, LogEnabled/*, Initializable*/, Disposable {
   
       /** The component manager instance */
       protected ComponentManager manager = null;
  @@ -209,6 +210,26 @@
           } catch (ConfigurationException ce) {
               this.logger.error("Could not configure Slide domain", ce);
               return;
  +        }
  +
  +        try {
  +            domain.start();
  +        } catch (Exception e) {
  +            this.logger.error("Could not start domain", e);
  +        }
  +    }
  +
  +    /**
  +     * The dispose operation is called at the end of a components lifecycle.
  +     * This method will be called after Startable.stop() method (if implemented
  +     * by component). Components use this method to release and destroy any
  +     * resources that the Component owns.
  +     */
  +    public void dispose() {
  +        try {
  +            domain.stop();
  +        } catch (Exception e) {
  +            this.logger.error("Could not stop domain", e);
           }
       }
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org