cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r927180 - in /cocoon/trunk/tools: cocoon-maven-plugin/ cocoon-rcl/cocoon-rcl-spring-reloader/ cocoon-rcl/cocoon-rcl-spring-reloader/src/main/java/org/apache/cocoon/tools/rcl/springreloader/ cocoon-rcl/cocoon-rcl-webapp-wrapper/
Date Wed, 24 Mar 2010 21:13:17 GMT
Author: reinhard
Date: Wed Mar 24 21:13:17 2010
New Revision: 927180

URL: http://svn.apache.org/viewvc?rev=927180&view=rev
Log:
Cocoon Maven plugin:
* upgrade to Spring 3.0.1.RELEASE
* use servlet-api 2.5

Modified:
    cocoon/trunk/tools/cocoon-maven-plugin/pom.xml
    cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-spring-reloader/pom.xml
    cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-spring-reloader/src/main/java/org/apache/cocoon/tools/rcl/springreloader/SynchronizedConfigureableWebApplicationContext.java
    cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-webapp-wrapper/pom.xml

Modified: cocoon/trunk/tools/cocoon-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-maven-plugin/pom.xml?rev=927180&r1=927179&r2=927180&view=diff
==============================================================================
--- cocoon/trunk/tools/cocoon-maven-plugin/pom.xml (original)
+++ cocoon/trunk/tools/cocoon-maven-plugin/pom.xml Wed Mar 24 21:13:17 2010
@@ -92,6 +92,7 @@
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
+	  <version>2.5</version>
       <scope>compile</scope>
     </dependency>
     <!-- test libs -->

Modified: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-spring-reloader/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-spring-reloader/pom.xml?rev=927180&r1=927179&r2=927180&view=diff
==============================================================================
--- cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-spring-reloader/pom.xml (original)
+++ cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-spring-reloader/pom.xml Wed Mar 24 21:13:17 2010
@@ -63,31 +63,37 @@
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
+	  <version>2.5</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-core</artifactId>
+      <version>3.0.1.RELEASE</version>	  
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-context</artifactId>
+	  <version>3.0.1.RELEASE</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-beans</artifactId>
+	  <version>3.0.1.RELEASE</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-aop</artifactId>
+	  <version>3.0.1.RELEASE</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-web</artifactId>
+	  <version>3.0.1.RELEASE</version>
       <scope>provided</scope>
     </dependency>
     <!--  test dependencies  -->

Modified: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-spring-reloader/src/main/java/org/apache/cocoon/tools/rcl/springreloader/SynchronizedConfigureableWebApplicationContext.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-spring-reloader/src/main/java/org/apache/cocoon/tools/rcl/springreloader/SynchronizedConfigureableWebApplicationContext.java?rev=927180&r1=927179&r2=927180&view=diff
==============================================================================
--- cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-spring-reloader/src/main/java/org/apache/cocoon/tools/rcl/springreloader/SynchronizedConfigureableWebApplicationContext.java
(original)
+++ cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-spring-reloader/src/main/java/org/apache/cocoon/tools/rcl/springreloader/SynchronizedConfigureableWebApplicationContext.java
Wed Mar 24 21:13:17 2010
@@ -17,6 +17,7 @@
 package org.apache.cocoon.tools.rcl.springreloader;
 
 import java.io.IOException;
+import java.lang.annotation.Annotation;
 import java.util.Locale;
 import java.util.Map;
 
@@ -55,8 +56,7 @@ public class SynchronizedConfigureableWe
 
     public SynchronizedConfigureableWebApplicationContext() throws BeansException {
         try {
-            appContext = (ConfigurableWebApplicationContext)
-                    BeanUtils.instantiateClass(XmlWebApplicationContext.class);
+            appContext = BeanUtils.instantiateClass(XmlWebApplicationContext.class);
         } catch (BeanInstantiationException e) {
             throw new RuntimeException("Can't create Spring application context.", e);
         }
@@ -65,8 +65,7 @@ public class SynchronizedConfigureableWe
     public synchronized void reload() {
         ConfigurableWebApplicationContext newAppContext = null;
         try {
-            newAppContext = (ConfigurableWebApplicationContext)
-                BeanUtils.instantiateClass(XmlWebApplicationContext.class);
+            newAppContext = BeanUtils.instantiateClass(XmlWebApplicationContext.class);
         } catch (BeanInstantiationException e) {
             throw new RuntimeException("Can't create Spring application context.", e);
         }
@@ -97,7 +96,7 @@ public class SynchronizedConfigureableWe
         return appContext.getAutowireCapableBeanFactory();
     }
 
-    public synchronized Object getBean(String arg0, Class arg1) throws BeansException {
+    public <T> T getBean(String arg0, Class<T> arg1) throws BeansException {
         return appContext.getBean(arg0, arg1);
     }
 
@@ -105,11 +104,8 @@ public class SynchronizedConfigureableWe
         return appContext.getBean(arg0);
     }
 
-    // Make the class compilable with Spring 2.1
-    // FIXME: delegate to appContext, when updating to Spring 2.1
-    public Object getBean(String arg0, Object[] arg1) throws BeansException {
-        throw new UnsupportedOperationException();
-        //return appContext.getBean(arg0, arg1);
+    public Object getBean(String arg0, Object... arg1) throws BeansException {
+        return appContext.getBean(arg0, arg1);
     }
 
     public synchronized int getBeanDefinitionCount() {
@@ -128,11 +124,11 @@ public class SynchronizedConfigureableWe
         return appContext.getBeanNamesForType(arg0);
     }
 
-    public synchronized Map getBeansOfType(Class arg0, boolean arg1, boolean arg2) throws
BeansException {
+    public <T> Map<String, T> getBeansOfType(Class<T> arg0, boolean arg1,
boolean arg2) throws BeansException {
         return appContext.getBeansOfType(arg0, arg1, arg2);
     }
 
-    public synchronized Map getBeansOfType(Class arg0) throws BeansException {
+    public <T> Map<String, T> getBeansOfType(Class<T> arg0) throws BeansException
{
         return appContext.getBeansOfType(arg0);
     }
 
@@ -281,4 +277,20 @@ public class SynchronizedConfigureableWe
     public String getId() {
         return appContext.getId();
     }
+
+    public <A extends Annotation> A findAnnotationOnBean(String arg0, Class<A>
arg1) {
+        return appContext.findAnnotationOnBean(arg0, arg1);
+    }
+
+    public Map<String, Object> getBeansWithAnnotation(Class<? extends Annotation>
arg0) throws BeansException {
+        return appContext.getBeansWithAnnotation(arg0);
+    }
+
+    public void setId(String arg0) {
+        appContext.setId(arg0);
+    }
+
+    public <T> T getBean(Class<T> requiredType) throws BeansException {
+        return appContext.getBean(requiredType);
+    }
 }
\ No newline at end of file

Modified: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-webapp-wrapper/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-webapp-wrapper/pom.xml?rev=927180&r1=927179&r2=927180&view=diff
==============================================================================
--- cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-webapp-wrapper/pom.xml (original)
+++ cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-webapp-wrapper/pom.xml Wed Mar 24 21:13:17 2010
@@ -59,31 +59,37 @@
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
+	  <version>2.5</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-core</artifactId>
+	  <version>3.0.1.RELEASE</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-context</artifactId>
+	  <version>3.0.1.RELEASE</version>	  
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-beans</artifactId>
+	  <version>3.0.1.RELEASE</version>	  
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-aop</artifactId>
+	  <version>3.0.1.RELEASE</version>	  
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-web</artifactId>
+	  <version>3.0.1.RELEASE</version>	  
       <scope>provided</scope>
     </dependency>
     <!--  test dependencies  -->



Mime
View raw message