cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon/webapp cocoon.xconf
Date Tue, 10 Apr 2001 17:09:05 GMT
bloritsch    01/04/10 10:09:04

  Modified:    .        Tag: xml-cocoon2 build.xml
               src/org/apache/cocoon Tag: xml-cocoon2 Cocoon.java
               webapp   Tag: xml-cocoon2 cocoon.xconf
  Added:       src/org/apache/cocoon Tag: xml-cocoon2 cocoon.roles
  Log:
  Completed separation of role configuration from cocoon.xconf
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.67  +1 -0      xml-cocoon/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/build.xml,v
  retrieving revision 1.6.2.66
  retrieving revision 1.6.2.67
  diff -u -r1.6.2.66 -r1.6.2.67
  --- build.xml	2001/04/09 14:00:19	1.6.2.66
  +++ build.xml	2001/04/10 17:09:02	1.6.2.67
  @@ -269,6 +269,7 @@
         <fileset dir="${build.src}">
           <include name="**/Manifest.mf"/>
           <include name="**/*.xsl"/>
  +	<include name="**/*.roles"/>
         </fileset>
       </copy>
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.69  +25 -1     xml-cocoon/src/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.4.2.68
  retrieving revision 1.4.2.69
  diff -u -r1.4.2.68 -r1.4.2.69
  --- Cocoon.java	2001/04/05 20:15:26	1.4.2.68
  +++ Cocoon.java	2001/04/10 17:09:03	1.4.2.69
  @@ -35,6 +35,7 @@
   import org.apache.cocoon.util.ClassUtils;
   import org.apache.cocoon.util.NetUtils;
   import org.apache.avalon.component.DefaultComponentManager;
  +import org.apache.avalon.component.DefaultRoleManager;
   import org.apache.avalon.AbstractLoggable;
   import org.xml.sax.SAXException;
   import org.xml.sax.InputSource;
  @@ -48,7 +49,7 @@
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
(Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.4.2.68 $ $Date: 2001/04/05 20:15:26 $
  + * @version CVS $Revision: 1.4.2.69 $ $Date: 2001/04/10 17:09:03 $
    */
   public class Cocoon extends AbstractLoggable implements Component, Initializable, Disposable,
Modifiable, Processor, Contextualizable {
       /** The application context */
  @@ -130,6 +131,29 @@
       /** Configure this <code>Cocoon</code> instance. */
       public void configure() throws ConfigurationException {
           Parser p = null;
  +        Configuration roleConfig = null;
  +
  +        try {
  +            p = (Parser)this.componentManager.lookup(Roles.PARSER);
  +            SAXConfigurationHandler b = new SAXConfigurationHandler();
  +            ClassLoader cl = (ClassLoader) this.context.get(Constants.CONTEXT_CLASS_LOADER);
  +            InputSource is = new InputSource(cl.getResourceAsStream("/org/apache/cocoon/cocoon.roles"));
  +            p.setContentHandler(b);
  +            is.setSystemId(this.configurationFile.toExternalForm());
  +            p.parse(is);
  +            roleConfig = b.getConfiguration();
  +        } catch (Exception e) {
  +            getLogger().error("Could not configure Cocoon environment", e);
  +            throw new ConfigurationException("Error trying to load configurations");
  +        } finally {
  +            if (p != null) this.componentManager.release((Component) p);
  +        }
  +
  +        DefaultRoleManager drm = new DefaultRoleManager();
  +        drm.setLogger(getLogger());
  +        drm.configure(roleConfig);
  +        this.componentManager.setRoleManager(drm);
  +        roleConfig = null;
   
           try {
               p = (Parser)this.componentManager.lookup(Roles.PARSER);
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +97 -0     xml-cocoon/src/org/apache/cocoon/Attic/cocoon.roles
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.36  +0 -97     xml-cocoon/webapp/Attic/cocoon.xconf
  
  Index: cocoon.xconf
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/webapp/Attic/cocoon.xconf,v
  retrieving revision 1.1.2.35
  retrieving revision 1.1.2.36
  diff -u -r1.1.2.35 -r1.1.2.36
  --- cocoon.xconf	2001/04/10 16:16:48	1.1.2.35
  +++ cocoon.xconf	2001/04/10 17:09:04	1.1.2.36
  @@ -3,7 +3,6 @@
   
   <!-- ===================== General Components =========================== -->
   
  -  <parser class="org.apache.cocoon.components.parser.JaxpParser"/>
     <store class="org.apache.cocoon.components.store.MemoryStore"/>
   
     <url-factory>
  @@ -103,100 +102,4 @@
   <!-- ======================== The sitemap  ============================== -->
   
     <sitemap file="sitemap.xmap"/>
  -
  -<!-- ====================== Component Roles ============================= -->
  -
  - <role name="org.apache.cocoon.components.parser.Parser"
  -       shorthand="parser"
  -       default-class="org.apache.cocoon.components.parser.JaxpParser"/>
  -
  - <role name="org.apache.cocoon.Processor"
  -       shorthand="processor"/>
  -
  - <role name="org.apache.cocoon.components.store.Store"
  -       shorthand="store"
  -       default-class="org.apache.cocoon.components.store.MemoryStore"/>
  -
  - <role name="org.apache.cocoon.components.store.Repository"
  -       shorthand="repository"
  -       default-class="org.apache.cocoon.components.store.FilesystemStore"/>
  -
  - <role name="org.apache.cocoon.components.language.generator.ServerPagesSelector"
  -       shorthand="server-pages"
  -       default-class="org.apache.cocoon.components.language.generator.GeneratorSelector"/>
  -
  - <role name="org.apache.cocoon.components.language.markup.MarkupLanguageSelector"
  -       shorthand="markup-languages"
  -       default-class="org.apache.avalon.component.DefaultComponentSelector"/>
  -
  - <role name="org.apache.cocoon.components.language.programming.ProgrammingLanguageSelector"
  -       shorthand="programming-languages"
  -       default-class="org.apache.avalon.component.DefaultComponentSelector"/>
  -
  - <role name="org.apache.cocoon.components.language.generator.ProgramGenerator"
  -       shorthand="program-generator"
  -       default-class="org.apache.cocoon.components.language.generator.ProgramGeneratorImpl"/>
  -
  - <role name="org.apache.cocoon.components.classloader.ClassLoaderManager"
  -       shorthand="classloader"
  -       default-class="org.apache.cocoon.components.classloader.ClassLoaderManagerImpl"/>
  -
  - <role name="org.apache.avalon.util.pool.PoolController"
  -       shorthand="pool-controller"
  -       default-class="org.apache.avalon.component.DefaultComponentPoolController"/>
  -
  - <role name="org.apache.cocoon.components.saxconnector.SAXConnector"
  -       shorthand="sax-connector"
  -       default-class="org.apache.cocoon.components.saxconnector.NullSAXConnector"/>
  -
  - <role name="org.apache.cocoon.components.image.ImageEncoderSelector"
  -       shorthand="image-encoder"/>
  -
  - <role name="org.apache.avalon.util.datasource.DataSourceComponentSelector"
  -       shorthand="datasources"
  -       default-class="org.apache.avalon.component.DefaultComponentSelector">
  -    <hint shorthand="jdbc" class="org.apache.avalon.util.datasource.JdbcDataSource"/>
  -    <hint shorthand="j2ee" class="org.apache.avalon.util.datasource.J2eeDataSource"/>
  -</role>
  -
  - <role name="org.apache.cocoon.components.url.URLFactory"
  -       shorthand="url-factory"
  -       default-class="org.apache.cocoon.components.url.URLFactoryImpl"/>
  -
  - <role name="org.apache.cocoon.components.pipeline.StreamPipeline"
  -       shorthand="stream-pipeline"
  -       default-class="org.apache.cocoon.components.pipeline.NonCachingStreamPipeline"/>
  -
  - <role name="org.apache.cocoon.components.pipeline.EventPipeline"
  -       shorthand="event-pipeline"
  -       default-class="org.apache.cocoon.components.pipeline.NonCachingEventPipeline"/>
  -
  - <role name="org.apache.cocoon.acting.ActionSelector"
  -       shorthand="action"
  -       default-class="org.apache.avalon.component.DefaultComponentSelector"/>
  -
  - <role name="org.apache.cocoon.selection.SelectorSelector"
  -       shorthand="selector"
  -       default-class="org.apache.avalon.component.DefaultComponentSelector"/>
  -
  - <role name="org.apache.cocoon.matching.MatcherSelector"
  -       shorthand="matcher"
  -       default-class="org.apache.avalon.component.DefaultComponentSelector"/>
  -
  - <role name="org.apache.cocoon.generation.GeneratorSelector"
  -       shorthand="generator"
  -       default-class="org.apache.avalon.component.DefaultComponentSelector"/>
  -
  - <role name="org.apache.cocoon.transformation.TransformerSelector"
  -       shorthand="transformer"
  -       default-class="org.apache.avalon.component.DefaultComponentSelector"/>
  -
  - <role name="org.apache.cocoon.serialization.SerializerSelector"
  -       shorthand="serializer"
  -       default-class="org.apache.cocoon.sitemap.SitemapComponentSelector"/>
  -
  - <role name="org.apache.cocoon.reading.ReaderSelector"
  -       shorthand="reader"
  -       default-class="org.apache.cocoon.sitemap.SitemapComponentSelector"/>
  -
   </cocoon>
  
  
  

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