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/src/org/apache/cocoon CocoonComponentSelector.java DefaultComponentManager.java
Date Thu, 18 Jan 2001 22:02:20 GMT
bloritsch    01/01/18 14:02:20

  Modified:    src/org/apache/cocoon Tag: xml-cocoon2
                        CocoonComponentSelector.java
                        DefaultComponentManager.java
  Log:
  A couple more fixes
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.13  +9 -11     xml-cocoon/src/org/apache/cocoon/Attic/CocoonComponentSelector.java
  
  Index: CocoonComponentSelector.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Attic/CocoonComponentSelector.java,v
  retrieving revision 1.1.2.12
  retrieving revision 1.1.2.13
  diff -u -r1.1.2.12 -r1.1.2.13
  --- CocoonComponentSelector.java	2001/01/18 21:34:28	1.1.2.12
  +++ CocoonComponentSelector.java	2001/01/18 22:02:14	1.1.2.13
  @@ -40,7 +40,7 @@
   /** Default component manager for Cocoon's non sitemap components.
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
    * @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
  - * @version CVS $Revision: 1.1.2.12 $ $Date: 2001/01/18 21:34:28 $
  + * @version CVS $Revision: 1.1.2.13 $ $Date: 2001/01/18 22:02:14 $
    */
   public class CocoonComponentSelector implements ComponentSelector, Composer, Configurable,
ThreadSafe {
       protected Logger log = LogKit.getLoggerFor("cocoon");
  @@ -166,18 +166,16 @@
       private Component getThreadsafeComponent(Object hint, Class component)
       throws ComponentManagerException {
   
  -        Component retVal = (Component) this.instances.get(hint);
  +        Component retVal;
   
  -        if (retVal == null) {
  -            try {
  -                retVal = (Component) component.newInstance();
  +        try {
  +            retVal = (Component) component.newInstance();
   
  -                this.setupComponent(hint, retVal);
  -                this.instances.put(hint, retVal);
  -            } catch (Exception e) {
  -                log.error("Could not set up the Component for hint: " + String.valueOf(hint),
e);
  -                throw new ComponentNotAccessibleException("Could not set up the Component
for hint: " + String.valueOf(hint), e);
  -            }
  +            this.setupComponent(hint, retVal);
  +            this.instances.put(hint, retVal);
  +        } catch (Exception e) {
  +            log.error("Could not set up the Component for hint: " + String.valueOf(hint),
e);
  +            throw new ComponentNotAccessibleException("Could not set up the Component for
hint: " + String.valueOf(hint), e);
           }
   
           return retVal;
  
  
  
  1.1.2.12  +5 -1      xml-cocoon/src/org/apache/cocoon/Attic/DefaultComponentManager.java
  
  Index: DefaultComponentManager.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Attic/DefaultComponentManager.java,v
  retrieving revision 1.1.2.11
  retrieving revision 1.1.2.12
  diff -u -r1.1.2.11 -r1.1.2.12
  --- DefaultComponentManager.java	2001/01/18 21:34:30	1.1.2.11
  +++ DefaultComponentManager.java	2001/01/18 22:02:16	1.1.2.12
  @@ -38,7 +38,7 @@
   
   /** Default component manager for Cocoon's non sitemap components.
    * @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
  - * @version CVS $Revision: 1.1.2.11 $ $Date: 2001/01/18 21:34:30 $
  + * @version CVS $Revision: 1.1.2.12 $ $Date: 2001/01/18 22:02:16 $
    */
   public class DefaultComponentManager implements ComponentManager, Configurable {
   
  @@ -101,6 +101,10 @@
               }
   
               this.components.put(role, componentClass);
  +
  +	    if (Configurable.class.isAssignableFrom(componentClass)) {
  +	        this.configurations.put(role, new DefaultConfiguration("", "-"));
  +	    }
           }
   
           if ( !Component.class.isAssignableFrom(componentClass) ) {
  
  
  

Mime
View raw message