cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dani...@apache.org
Subject svn commit: r572164 - in /cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/configurator: ResourceUtils.java impl/AbstractSettingsElementParser.java
Date Sun, 02 Sep 2007 21:23:36 GMT
Author: danielf
Date: Sun Sep  2 14:23:36 2007
New Revision: 572164

URL: http://svn.apache.org/viewvc?rev=572164&view=rev
Log:
Get the resource pattern resolver from the context instead of creating one. This doesn't change
the behavior in ordinary servlet context (AFAICS) and makes it work in the Spring-OSGi context
as well.

Modified:
    cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/configurator/ResourceUtils.java
    cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/configurator/impl/AbstractSettingsElementParser.java

Modified: cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/configurator/ResourceUtils.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/configurator/ResourceUtils.java?rev=572164&r1=572163&r2=572164&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/configurator/ResourceUtils.java
(original)
+++ cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/configurator/ResourceUtils.java
Sun Sep  2 14:23:36 2007
@@ -90,7 +90,7 @@
         if (logger != null && logger.isDebugEnabled()) {
             logger.debug("Reading properties from directory: " + propertiesPath);
         }
-        final ResourcePatternResolver resolver = new ServletContextResourcePatternResolver(resourceLoader);
+        final ResourcePatternResolver resolver = (ResourcePatternResolver) resourceLoader;
 
         Resource[] resources = null;
 

Modified: cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/configurator/impl/AbstractSettingsElementParser.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/configurator/impl/AbstractSettingsElementParser.java?rev=572164&r1=572163&r2=572164&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/configurator/impl/AbstractSettingsElementParser.java
(original)
+++ cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/configurator/impl/AbstractSettingsElementParser.java
Sun Sep  2 14:23:36 2007
@@ -30,7 +30,7 @@
 import org.springframework.beans.factory.xml.ParserContext;
 import org.springframework.core.io.Resource;
 import org.springframework.core.io.ResourceLoader;
-import org.springframework.web.context.support.ServletContextResourcePatternResolver;
+import org.springframework.core.io.support.ResourcePatternResolver;
 import org.w3c.dom.Element;
 
 /**
@@ -166,8 +166,8 @@
                                      final String        path,
                                      final boolean       optional)
     throws Exception {
-        final ResourceLoader resourceLoader = parserContext.getReaderContext().getReader().getResourceLoader();
-        ServletContextResourcePatternResolver resolver = new ServletContextResourcePatternResolver(resourceLoader);
+        final ResourcePatternResolver resolver = 
+            (ResourcePatternResolver) parserContext.getReaderContext().getReader().getResourceLoader();
 
         // check if the directory to read from exists
         // we only check if optional is set to true



Mime
View raw message