cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: svn commit: r470732 - in /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring: CocoonPropertyOverrideConfigurer.java SettingsBeanFactoryPostProcessor.java SettingsElementParser.java
Date Fri, 03 Nov 2006 09:17:03 GMT
cziegeler@apache.org wrote:
> Author: cziegeler
> Date: Fri Nov  3 01:10:13 2006
> New Revision: 470732
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=470732
> Log:
> Start support for reading configuration files directly from within the jars
> 
> Modified:
>     cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java
>     cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/SettingsBeanFactoryPostProcessor.java
>     cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/SettingsElementParser.java
> 
> Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java
> URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java?view=diff&rev=470732&r1=470731&r2=470732
> ==============================================================================
> --- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java
(original)
> +++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonPropertyOverrideConfigurer.java
Fri Nov  3 01:10:13 2006
> @@ -81,10 +81,13 @@
>          if ( this.logger.isDebugEnabled() ) {
>              this.logger.debug("Processing bean factory: " + beanFactory);
>          }
> +        final String mode = (this.settings != null ? this.settings.getRunningMode()
: SettingsDefaults.DEFAULT_RUNNING_MODE);
>          final Properties mergedProps = new Properties();
> +        ResourceUtils.readProperties("classpath:*/META-INF/cocoon/spring", mergedProps,
this.resourceLoader, this.logger);
> +        ResourceUtils.readProperties("classpath:*/META-INF/cocoon/spring/" + mode, mergedProps,
this.resourceLoader, this.logger);
> +


> Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/SettingsElementParser.java
> URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/SettingsElementParser.java?view=diff&rev=470732&r1=470731&r2=470732
> ==============================================================================
> --- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/SettingsElementParser.java
(original)
> +++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/SettingsElementParser.java
Fri Nov  3 01:10:13 2006
> @@ -68,6 +68,7 @@
>  
>          // handle includes
>          try {
> +            this.handleBeanInclude(parserContext, null, "classpath*:/META-INF/cocoon/spring",
"*.xml", true);
>              this.handleBeanInclude(parserContext, null, springConfigLocation, "*.xml",
true);
>          } catch (Exception e) {
>              throw new BeanDefinitionStoreException("Unable to read spring configurations
from " + springConfigLocation, e);

wow... that easy :)


-- 
Leszek Gawron                                    CTO at MobileBox Ltd.


Mime
View raw message