cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.2/src/java/org/apache/cocoon/components/modules/input XMLFileModule.java PropertiesFileModule.java
Date Sun, 22 Feb 2004 18:10:59 GMT
cziegeler    2004/02/22 10:10:59

  Modified:    src/java/org/apache/cocoon/components/modules/input
                        XMLFileModule.java PropertiesFileModule.java
  Log:
  Apply patch by Marco Rolappe: Release source resolver (bug 27063)
  
  Revision  Changes    Path
  1.12      +16 -4     cocoon-2.2/src/java/org/apache/cocoon/components/modules/input/XMLFileModule.java
  
  Index: XMLFileModule.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/modules/input/XMLFileModule.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- XMLFileModule.java	6 Feb 2004 22:24:40 -0000	1.11
  +++ XMLFileModule.java	22 Feb 2004 18:10:59 -0000	1.12
  @@ -100,10 +100,10 @@
       /** Default value for cachability of sources */
       boolean cacheAll = true;
       /** Default src */
  -    String src = null;
  +    String src;
   
  -    SourceResolver resolver = null;
  -    ServiceManager manager = null;
  +    SourceResolver resolver;
  +    ServiceManager manager;
       
   
       /**
  @@ -205,6 +205,18 @@
       }
   
   
  +	/* (non-Javadoc)
  +	 * @see org.apache.avalon.framework.activity.Disposable#dispose()
  +	 */
  +	public void dispose() {
  +		super.dispose();
  +        if ( this.manager != null ) {
  +            this.manager.release( this.resolver );
  +            this.manager = null;
  +            this.resolver = null;
  +        }
  +	}
  +    
       /**
        * Static (cocoon.xconf) configuration.
        * Configuration is expected to be of the form:
  
  
  
  1.5       +15 -1     cocoon-2.2/src/java/org/apache/cocoon/components/modules/input/PropertiesFileModule.java
  
  Index: PropertiesFileModule.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/modules/input/PropertiesFileModule.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PropertiesFileModule.java	30 Dec 2003 12:21:53 -0000	1.4
  +++ PropertiesFileModule.java	22 Feb 2004 18:10:59 -0000	1.5
  @@ -83,6 +83,8 @@
   public class PropertiesFileModule extends AbstractJXPathModule 
   implements InputModule, Serviceable, Configurable, ThreadSafe {
       
  +    private ServiceManager m_manager;
  +    
       private SourceResolver m_resolver;
       
       private Properties m_properties;
  @@ -91,9 +93,21 @@
        * @avalon.dependency type="SourceResolver"
        */
       public void service(ServiceManager manager) throws ServiceException {
  -        m_resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
  +        m_manager = manager;
  +        m_resolver = (SourceResolver) m_manager.lookup(SourceResolver.ROLE);
       }
       
  +	/* (non-Javadoc)
  +	 * @see org.apache.avalon.framework.activity.Disposable#dispose()
  +	 */
  +	public void dispose() {		
  +		super.dispose();
  +        if ( this.m_manager != null ) {
  +            this.m_manager.release( this.m_resolver );
  +            this.m_manager = null;
  +            this.m_resolver = null;
  +        }
  +	}
       /**
        * Configure the location of the properties file:
        * <p>
  
  
  

Mime
View raw message