cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r416361 - in /cocoon/trunk/core/cocoon-core: ./ src/main/java/org/apache/cocoon/core/container/spring/ src/main/java/org/apache/cocoon/core/osgi/ src/main/resources/META-INF/spring/
Date Thu, 22 Jun 2006 13:07:05 GMT
Author: cziegeler
Date: Thu Jun 22 06:07:04 2006
New Revision: 416361

URL: http://svn.apache.org/viewvc?rev=416361&view=rev
Log:
Upgrade to Spring 2.0rc1

Modified:
    cocoon/trunk/core/cocoon-core/pom.xml
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/BeanFactoryFactoryImpl.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonBeanFactory.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/osgi/OSGiSpringECMFactory.java
    cocoon/trunk/core/cocoon-core/src/main/resources/META-INF/spring/cocoon-core-applicationContext.xml

Modified: cocoon/trunk/core/cocoon-core/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/pom.xml?rev=416361&r1=416360&r2=416361&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/pom.xml (original)
+++ cocoon/trunk/core/cocoon-core/pom.xml Thu Jun 22 06:07:04 2006
@@ -272,11 +272,32 @@
       <groupId>jakarta-bcel</groupId>
       <artifactId>jakarta-bcel</artifactId>
       <version>20040329</version>
-    </dependency> 
+    </dependency>
+    <!-- We have to include all relevant spring modules as the poms for 2.0rc1 are not
available --> 
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-web</artifactId>
-      <version>1.2.6</version>
+      <version>2.0-rc1</version>
+    </dependency>           
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context</artifactId>
+      <version>2.0-rc1</version>
+    </dependency>           
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-aop</artifactId>
+      <version>2.0-rc1</version>
+    </dependency>           
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-beans</artifactId>
+      <version>2.0-rc1</version>
+    </dependency>           
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-core</artifactId>
+      <version>2.0-rc1</version>
     </dependency>           
     <dependency>
       <groupId>org.apache.cocoon</groupId>

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/BeanFactoryFactoryImpl.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/BeanFactoryFactoryImpl.java?rev=416361&r1=416360&r2=416361&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/BeanFactoryFactoryImpl.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/BeanFactoryFactoryImpl.java
Thu Jun 22 06:07:04 2006
@@ -74,7 +74,7 @@
     }
 
     /**
-     * @see org.apache.cocoon.core.container.spring.BeanFactoryFactory#createBeanFactory(org.apache.avalon.framework.logger.Logger,
org.apache.avalon.framework.configuration.Configuration, org.apache.avalon.framework.context.Context,
org.apache.excalibur.source.SourceResolver, org.apache.cocoon.core.Settings)
+     * @see org.apache.cocoon.core.container.spring.BeanFactoryFactory#createBeanFactory(java.lang.ClassLoader,
org.apache.avalon.framework.logger.Logger, org.apache.avalon.framework.configuration.Configuration,
org.apache.avalon.framework.context.Context, org.apache.excalibur.source.SourceResolver, org.apache.cocoon.core.Settings)
      */
     public ConfigurableListableBeanFactory createBeanFactory(ClassLoader    classLoader,
                                                              Logger         sitemapLogger,

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonBeanFactory.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonBeanFactory.java?rev=416361&r1=416360&r2=416361&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonBeanFactory.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/container/spring/CocoonBeanFactory.java
Thu Jun 22 06:07:04 2006
@@ -21,7 +21,6 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.DefaultConfiguration;
@@ -63,8 +62,6 @@
     protected final Context avalonContext;
     protected final ConfigurationInfo avalonConfiguration;
 
-    protected final List disposeBeans = new ArrayList();
-
     public CocoonBeanFactory(BeanFactory parent) {
         this(null, parent, null, null, null, null);
     }
@@ -117,17 +114,6 @@
     }
 
     /**
-     * @see org.springframework.beans.factory.support.AbstractBeanFactory#destroySingletons()
-     */
-    public void destroySingletons() {
-        super.destroySingletons();
-        for(int i=this.disposeBeans.size()-1;i>=0;i--) {
-            ContainerUtil.dispose(this.disposeBeans.get(i));
-        }
-        this.disposeBeans.clear();
-    }
-
-    /**
      * This is a Spring BeanPostProcessor adding support for the Avalon lifecycle interfaces.
      */
     protected static final class AvalonPostProcessor implements DestructionAwareBeanPostProcessor
{
@@ -213,9 +199,7 @@
             } catch (Exception e) {
                 throw new BeanInitializationException("Unable to stop bean " + beanName,
e);
             }
-            if ( bean instanceof Disposable ) {
-                this.beanFactory.disposeBeans.add(bean);
-            }
+            ContainerUtil.dispose(bean);
         }
     }
 }

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/osgi/OSGiSpringECMFactory.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/osgi/OSGiSpringECMFactory.java?rev=416361&r1=416360&r2=416361&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/osgi/OSGiSpringECMFactory.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/osgi/OSGiSpringECMFactory.java
Thu Jun 22 06:07:04 2006
@@ -42,6 +42,7 @@
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.component.ComponentContext;
 import org.springframework.beans.BeansException;
+import org.springframework.beans.PropertyEditorRegistrar;
 import org.springframework.beans.factory.BeanFactory;
 import org.springframework.beans.factory.FactoryBean;
 import org.springframework.beans.factory.NoSuchBeanDefinitionException;
@@ -49,6 +50,7 @@
 import org.springframework.beans.factory.config.BeanPostProcessor;
 import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
 import org.springframework.beans.factory.config.DestructionAwareBeanPostProcessor;
+import org.springframework.beans.factory.config.Scope;
 
 /**
  * The @link {@link OSGiSpringECMFactory} gives access to all Spring beans via the 
@@ -406,14 +408,6 @@
 	}
 
 	/**
-	 * @deprecated
-	 * @see org.springframework.beans.factory.ListableBeanFactory#getBeanDefinitionNames(java.lang.Class)
-	 */
-	public String[] getBeanDefinitionNames(Class arg0) {
-		return this.beanFactory.getBeanDefinitionNames(arg0);
-	}
-
-	/**
 	 * @see org.springframework.beans.factory.ListableBeanFactory#getBeanNamesForType(java.lang.Class,
boolean, boolean)
 	 */
 	public String[] getBeanNamesForType(Class arg0, boolean arg1, boolean arg2) {
@@ -524,4 +518,81 @@
 	public void setParentBeanFactory(BeanFactory arg0) {
 		this.beanFactory.setParentBeanFactory(arg0);
 	}
+
+    /**
+     * @see org.springframework.beans.factory.config.ConfigurableBeanFactory#addPropertyEditorRegistrar(org.springframework.beans.PropertyEditorRegistrar)
+     */
+    public void addPropertyEditorRegistrar(PropertyEditorRegistrar arg0) {
+        this.beanFactory.addPropertyEditorRegistrar(arg0);
+    }
+
+    /**
+     * @see org.springframework.beans.factory.config.ConfigurableBeanFactory#destroyScopedBean(java.lang.String)
+     */
+    public void destroyScopedBean(String arg0) {
+        this.beanFactory.destroyScopedBean(arg0);
+    }
+
+    /**
+     * @see org.springframework.beans.factory.config.ConfigurableBeanFactory#getBeanClassLoader()
+     */
+    public ClassLoader getBeanClassLoader() {
+        return this.beanFactory.getBeanClassLoader();
+    }
+
+    /**
+     * @see org.springframework.beans.factory.config.ConfigurableBeanFactory#isCacheBeanMetadata()
+     */
+    public boolean isCacheBeanMetadata() {
+        return this.beanFactory.isCacheBeanMetadata();
+    }
+
+    /**
+     * @see org.springframework.beans.factory.config.ConfigurableBeanFactory#registerScope(java.lang.String,
org.springframework.beans.factory.config.Scope)
+     */
+    public void registerScope(String arg0, Scope arg1) {
+        this.beanFactory.registerScope(arg0, arg1);
+    }
+
+    /**
+     * @see org.springframework.beans.factory.config.ConfigurableBeanFactory#setBeanClassLoader(java.lang.ClassLoader)
+     */
+    public void setBeanClassLoader(ClassLoader arg0) {
+        this.beanFactory.setBeanClassLoader(arg0);
+    }
+
+    /**
+     * @see org.springframework.beans.factory.config.ConfigurableBeanFactory#setCacheBeanMetadata(boolean)
+     */
+    public void setCacheBeanMetadata(boolean arg0) {
+        this.beanFactory.setCacheBeanMetadata(arg0);
+    }
+
+    /**
+     * @see org.springframework.beans.factory.HierarchicalBeanFactory#containsLocalBean(java.lang.String)
+     */
+    public boolean containsLocalBean(String arg0) {
+        return this.beanFactory.containsLocalBean(arg0);
+    }
+
+    /**
+     * @see org.springframework.beans.factory.config.AutowireCapableBeanFactory#configureBean(java.lang.Object,
java.lang.String)
+     */
+    public Object configureBean(Object arg0, String arg1) throws BeansException {
+        return this.beanFactory.configureBean(arg0, arg1);
+    }
+
+    /**
+     * @see org.springframework.beans.factory.config.AutowireCapableBeanFactory#createBean(java.lang.Class,
int, boolean)
+     */
+    public Object createBean(Class arg0, int arg1, boolean arg2) throws BeansException {
+        return this.beanFactory.createBean(arg0, arg1, arg2);
+    }
+
+    /**
+     * @see org.springframework.beans.factory.config.AutowireCapableBeanFactory#initializeBean(java.lang.Object,
java.lang.String)
+     */
+    public Object initializeBean(Object arg0, String arg1) throws BeansException {
+        return this.beanFactory.initializeBean(arg0, arg1);
+    }
 }

Modified: cocoon/trunk/core/cocoon-core/src/main/resources/META-INF/spring/cocoon-core-applicationContext.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/resources/META-INF/spring/cocoon-core-applicationContext.xml?rev=416361&r1=416360&r2=416361&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/resources/META-INF/spring/cocoon-core-applicationContext.xml
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/resources/META-INF/spring/cocoon-core-applicationContext.xml
Thu Jun 22 06:07:04 2006
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
 <!--
   Copyright 2006 The Apache Software Foundation
 
@@ -16,6 +17,4 @@
 -->
 
 <!-- @version $Id: applicationContext.xml 387946 2006-03-22 21:07:56Z cziegeler $ -->
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-
 <beans/>



Mime
View raw message