cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject cvs commit: cocoon-2.2/src/java/org/apache/cocoon Cocoon.java
Date Mon, 29 Dec 2003 21:49:25 GMT
unico       2003/12/29 13:49:25

  Modified:    src/java/org/apache/cocoon/servlet CocoonServlet.java
               src/webapp/WEB-INF cocoon.xconf
               src/java/org/apache/cocoon Cocoon.java
  Log:
  that elusive CompilingProcessor ..
  
  Revision  Changes    Path
  1.26      +3 -4      cocoon-2.2/src/java/org/apache/cocoon/servlet/CocoonServlet.java
  
  Index: CocoonServlet.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/servlet/CocoonServlet.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- CocoonServlet.java	28 Dec 2003 20:52:21 -0000	1.25
  +++ CocoonServlet.java	29 Dec 2003 21:49:25 -0000	1.26
  @@ -351,8 +351,8 @@
           String cocoonConfigURI = servletContextURL + cocoonConfig;
           cocoonBean.setConfigURI(cocoonConfigURI);
           
  -//        URL cocoonConfigURL = getConfigFile(cocoonConfigURI);
  -//        cocoonBean.setProperty(Constants.CONTEXT_CONFIG_URL,cocoonConfigURL);
  +        URL cocoonConfigURL = getConfigFile(cocoonConfigURI);
  +        cocoonBean.setProperty(Constants.CONTEXT_CONFIG_URL,cocoonConfigURL);
   
           String logConfig = getInitParameter("log-config", "/WEB-INF/logkit.xconf");
           String logConfigURI = servletContextURL + logConfig;
  @@ -1095,7 +1095,6 @@
                    */
   
                   if (processor.process(env)) {
  -                    env.commitResponse();
                       contentType = env.getContentType();
                   } else {
                       // We reach this when there is nothing in the processing change that
matches
  
  
  
  1.36      +7 -0      cocoon-2.2/src/webapp/WEB-INF/cocoon.xconf
  
  Index: cocoon.xconf
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/webapp/WEB-INF/cocoon.xconf,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- cocoon.xconf	28 Dec 2003 20:50:02 -0000	1.35
  +++ cocoon.xconf	29 Dec 2003 21:49:25 -0000	1.36
  @@ -8,6 +8,13 @@
       |  (stuff like XML parsers or XSLT processors).
       +-->
   
  +<!-- =========================== Cocoon =============================== -->
  +
  +  <cocoon
  +    id="cocoon"
  +    logger="cocoon"
  +  />
  +
   <!-- =========================== Sitemap =============================== -->
   
     <!--+
  
  
  
  1.30      +21 -13    cocoon-2.2/src/java/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- Cocoon.java	7 Nov 2003 13:30:20 -0000	1.29
  +++ Cocoon.java	29 Dec 2003 21:49:25 -0000	1.30
  @@ -50,6 +50,12 @@
   */
   package org.apache.cocoon;
   
  +import java.io.IOException;
  +import java.net.URL;
  +import java.util.Collections;
  +import java.util.Enumeration;
  +import java.util.Map;
  +
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  @@ -74,12 +80,6 @@
   import org.apache.excalibur.source.SourceResolver;
   import org.apache.excalibur.source.impl.URLSource;
   
  -import java.io.IOException;
  -import java.net.URL;
  -import java.util.Collections;
  -import java.util.Enumeration;
  -import java.util.Map;
  -
   /**
    * The Cocoon Object is the main Kernel for the entire Cocoon system.
    *
  @@ -87,15 +87,20 @@
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
    * @author <a href="mailto:leo.sutic@inspireinfrastructure.com">Leo Sutic</a>
    * @version CVS $Id$
  + * 
  + * @avalon.component
  + * @avalon.service type=CompilingProcessor
  + * @x-avalon.lifestyle type=singleton
  + * @x-avalon.info name=cocoon
    */
   public class Cocoon
           extends AbstractLogEnabled
  -        implements Serviceable,
  +        implements CompilingProcessor,
  +                   Contextualizable,
  +                   Serviceable,
                      Initializable,
                      Disposable,
  -                   Modifiable,
  -                   CompilingProcessor,
  -                   Contextualizable {
  +                   Modifiable {
   
       /** The application context */
       private Context context;
  @@ -135,11 +140,13 @@
        * avoiding extra method calls, the manager parameter may be null.
        *
        * @param manager the parent component manager. May be <code>null</code>
  +     * 
  +     * @avalon.dependency type=SourceResolver
        */
       public void service(ServiceManager manager) 
       throws ServiceException {
           this.serviceManager = manager;
  -        this.sourceResolver = (SourceResolver)this.serviceManager.lookup(SourceResolver.ROLE);
  +        this.sourceResolver = (SourceResolver) this.serviceManager.lookup(SourceResolver.ROLE);
           try {
               this.environmentHelper = new EnvironmentHelper(
                            (String) this.context.get(Constants.CONTEXT_ROOT_URL));
  @@ -377,7 +384,8 @@
                   ++activeRequestCount;
                   this.debug(environment, false);
               }
  -
  +            // FIXME: the processor is most likely threadsafe
  +            // cache it for speed ...
               Processor processor = null;
               try {
                   processor = (Processor) this.serviceManager.lookup( Processor.ROLE );
  
  
  

Mime
View raw message