cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r462606 - in /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon: ComponentInfo.java ConfigurationReader.java
Date Tue, 10 Oct 2006 22:20:07 GMT
Author: cziegeler
Date: Tue Oct 10 15:20:05 2006
New Revision: 462606

URL: http://svn.apache.org/viewvc?view=rev&rev=462606
Log:
Fix error in handling of lazy-init setting for avalon components

Modified:
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/ComponentInfo.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/ConfigurationReader.java

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/ComponentInfo.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/ComponentInfo.java?view=diff&rev=462606&r1=462605&r2=462606
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/ComponentInfo.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/ComponentInfo.java
Tue Oct 10 15:20:05 2006
@@ -342,4 +342,8 @@
     public void setProcessedConfiguration(Configuration processedConfiguration) {
         this.processedConfiguration = processedConfiguration;
     }
+
+    public boolean hasConfiguredLazyInit() {
+        return this.configuration != null && this.configuration.getAttribute("lazy-init",
null) != null;
+    }
 }

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/ConfigurationReader.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/ConfigurationReader.java?view=diff&rev=462606&r1=462605&r2=462606
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/ConfigurationReader.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/avalon/ConfigurationReader.java
Tue Oct 10 15:20:05 2006
@@ -280,7 +280,9 @@
         final Iterator i = this.configInfo.getRoles().iterator();
         while ( i.hasNext() ) {
             final ComponentInfo current = (ComponentInfo)i.next();
-            current.setLazyInit(true);
+            if ( !current.hasConfiguredLazyInit() ) {
+                current.setLazyInit(true);
+            }
             this.configInfo.addComponent(current);
         }
         this.configInfo.clearRoles();



Mime
View raw message