cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/environment URLFactorySourceResolver.java
Date Mon, 29 Apr 2002 13:23:03 GMT
cziegeler    02/04/29 06:23:03

  Modified:    src/java/org/apache/cocoon/components/treeprocessor
                        TreeProcessor.java
               src/java/org/apache/cocoon/components/xscript
                        XScriptObjectResult.java
               src/java/org/apache/cocoon/environment
                        URLFactorySourceResolver.java
  Log:
  Some more updates for source resolving
  
  Revision  Changes    Path
  1.10      +9 -11     xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java
  
  Index: TreeProcessor.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TreeProcessor.java	27 Apr 2002 18:30:50 -0000	1.9
  +++ TreeProcessor.java	29 Apr 2002 13:23:03 -0000	1.10
  @@ -54,7 +54,6 @@
   import org.apache.avalon.excalibur.component.RoleManager;
   import org.apache.avalon.excalibur.logger.LogKitManageable;
   import org.apache.avalon.excalibur.logger.LogKitManager;
  -
   import org.apache.avalon.framework.activity.Disposable;
   
   import org.apache.avalon.framework.component.Component;
  @@ -84,8 +83,8 @@
   import org.apache.cocoon.components.pipeline.EventPipeline;
   import org.apache.cocoon.components.pipeline.StreamPipeline;
   import org.apache.cocoon.components.source.DelayedRefreshSourceWrapper;
  +import org.apache.cocoon.components.source.SourceUtil;
   import org.apache.cocoon.components.source.URLSource;
  -import org.apache.cocoon.components.url.URLFactory;
   import org.apache.cocoon.environment.Environment;
   import org.apache.cocoon.environment.Source;
   
  @@ -96,7 +95,7 @@
    * Interpreted tree-traversal implementation of a pipeline assembly language.
    *
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
  - * @version CVS $Id: TreeProcessor.java,v 1.9 2002/04/27 18:30:50 vgritsenko Exp $
  + * @version CVS $Id: TreeProcessor.java,v 1.10 2002/04/29 13:23:03 cziegeler Exp $
    */
   
   public class TreeProcessor extends AbstractLoggable implements ThreadSafe, Processor,
  @@ -244,24 +243,23 @@
   
           // Read the builtin languages definition file
           Configuration builtin;
  -
  +        org.apache.excalibur.source.SourceResolver resolver = null;
           try {
  -            URLFactory factory = (URLFactory)this.manager.lookup(URLFactory.ROLE);
  -            URLSource source = new URLSource(factory.getURL(xconfURL), this.manager);
  +            resolver = (org.apache.excalibur.source.SourceResolver)this.manager.lookup(org.apache.excalibur.source.SourceResolver.ROLE);
  +            org.apache.excalibur.source.Source source = resolver.resolveURI( xconfURL );
               try {
                   SAXConfigurationHandler handler = new SAXConfigurationHandler();
  -                source.toSAX(handler);
  +                SourceUtil.toSAX(source, handler, manager);
                   builtin = handler.getConfiguration();
               } finally {
  -                this.manager.release((Component)factory);
  -                if (source != null) {
  -                    source.recycle();
  -                }
  +                resolver.release( source );
               }
           } catch(Exception e) {
               String msg = "Error while reading treeprocessor.xconf : " + e.getMessage();
               getLogger().error(msg, e);
               throw new ConfigurationException(msg, e);
  +        } finally {
  +            this.manager.release( resolver );
           }
   
           // Create a selector for tree builders of all languages
  
  
  
  1.5       +1 -2      xml-cocoon2/src/java/org/apache/cocoon/components/xscript/XScriptObjectResult.java
  
  Index: XScriptObjectResult.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/xscript/XScriptObjectResult.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XScriptObjectResult.java	22 Feb 2002 07:00:15 -0000	1.4
  +++ XScriptObjectResult.java	29 Apr 2002 13:23:03 -0000	1.5
  @@ -57,14 +57,13 @@
   import javax.xml.transform.sax.SAXResult;
   import javax.xml.transform.stream.StreamResult;
   import org.apache.cocoon.ProcessingException;
  -import org.apache.cocoon.components.url.URLFactory;
   
   /**
    * An <code>XScriptObject</code> created from a JAXP
    * <code>Result</code> object.
    *
    * @author <a href="mailto:ovidiu@cup.hp.com">Ovidiu Predescu</a>
  - * @version CVS $Id: XScriptObjectResult.java,v 1.4 2002/02/22 07:00:15 cziegeler Exp $
  + * @version CVS $Id: XScriptObjectResult.java,v 1.5 2002/04/29 13:23:03 cziegeler Exp $
    * @since   August 30, 2001
    */
   public class XScriptObjectResult extends XScriptObject
  
  
  
  1.9       +2 -1      xml-cocoon2/src/java/org/apache/cocoon/environment/URLFactorySourceResolver.java
  
  Index: URLFactorySourceResolver.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/URLFactorySourceResolver.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- URLFactorySourceResolver.java	25 Apr 2002 09:37:01 -0000	1.8
  +++ URLFactorySourceResolver.java	29 Apr 2002 13:23:03 -0000	1.9
  @@ -66,9 +66,10 @@
   
   /**
    * A <code>SourceResolver</code> based on a <code>URLFactory</code>.
  + * @deprecated by the new source resolving
    *
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
  - * @version CVS $Id: URLFactorySourceResolver.java,v 1.8 2002/04/25 09:37:01 cziegeler
Exp $
  + * @version CVS $Id: URLFactorySourceResolver.java,v 1.9 2002/04/29 13:23:03 cziegeler
Exp $
    */
   
   public class URLFactorySourceResolver implements SourceResolver {
  
  
  

----------------------------------------------------------------------
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


Mime
View raw message