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.1/src/java/org/apache/cocoon/components/modules/input PropertiesFileModule.java XMLFileModule.java
Date Sun, 22 Feb 2004 18:07:16 GMT
cziegeler    2004/02/22 10:07:16

  Modified:    src/java/org/apache/cocoon/components/modules/input
                        PropertiesFileModule.java XMLFileModule.java
  Log:
  Apply patch by Marco Rolappe: Release source resolver (bug 27063)
  
  Revision  Changes    Path
  1.3       +18 -1     cocoon-2.1/src/java/org/apache/cocoon/components/modules/input/PropertiesFileModule.java
  
  Index: PropertiesFileModule.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/modules/input/PropertiesFileModule.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PropertiesFileModule.java	31 Oct 2003 17:03:22 -0000	1.2
  +++ PropertiesFileModule.java	22 Feb 2004 18:07:16 -0000	1.3
  @@ -78,15 +78,32 @@
   public class PropertiesFileModule extends AbstractJXPathModule 
   implements InputModule, Serviceable, Configurable, ThreadSafe {
       
  +    private ServiceManager m_manager;
  +    
       private SourceResolver m_resolver;
       
       private Properties m_properties;
       
       
  +    /* (non-Javadoc)
  +     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
  +     */
       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>
  
  
  
  1.14      +13 -2     cocoon-2.1/src/java/org/apache/cocoon/components/modules/input/XMLFileModule.java
  
  Index: XMLFileModule.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/modules/input/XMLFileModule.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- XMLFileModule.java	19 Feb 2004 22:13:28 -0000	1.13
  +++ XMLFileModule.java	22 Feb 2004 18:07:16 -0000	1.14
  @@ -244,7 +244,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:
  
  
  

Mime
View raw message