geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r720519 - in /geronimo/server/trunk/plugins/concurrent: geronimo-concurrent-core/ geronimo-concurrent-core/src/main/java/org/apache/geronimo/concurrent/executor/ geronimo-concurrent/ geronimo-concurrent/src/main/java/org/apache/geronimo/con...
Date Tue, 25 Nov 2008 16:00:30 GMT
Author: gawor
Date: Tue Nov 25 08:00:30 2008
New Revision: 720519

URL: http://svn.apache.org/viewvc?rev=720519&view=rev
Log:
patch code at build time to complie concurrency module on java 5 and 6 (GERONIMO-4089)

Modified:
    geronimo/server/trunk/plugins/concurrent/geronimo-concurrent-core/pom.xml
    geronimo/server/trunk/plugins/concurrent/geronimo-concurrent-core/src/main/java/org/apache/geronimo/concurrent/executor/AbstractManagedExecutorService.java
    geronimo/server/trunk/plugins/concurrent/geronimo-concurrent-core/src/main/java/org/apache/geronimo/concurrent/executor/ManagedExecutorServiceFacade.java
    geronimo/server/trunk/plugins/concurrent/geronimo-concurrent/pom.xml
    geronimo/server/trunk/plugins/concurrent/geronimo-concurrent/src/main/java/org/apache/geronimo/concurrent/impl/executor/ManagedExecutorServiceModuleFacade.java

Modified: geronimo/server/trunk/plugins/concurrent/geronimo-concurrent-core/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/concurrent/geronimo-concurrent-core/pom.xml?rev=720519&r1=720518&r2=720519&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/concurrent/geronimo-concurrent-core/pom.xml (original)
+++ geronimo/server/trunk/plugins/concurrent/geronimo-concurrent-core/pom.xml Tue Nov 25 08:00:30
2008
@@ -34,7 +34,7 @@
     <artifactId>geronimo-concurrent-core</artifactId>
     <name>Geronimo Plugins, Concurrency Utilities :: Core</name>
 
-   <dependencies>
+    <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-concurrent_1.0_spec</artifactId>
@@ -47,6 +47,70 @@
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-jta_1.1_spec</artifactId>
         </dependency>
-   </dependencies>
+    </dependencies>
+
+    <build>
+        <sourceDirectory>${basedir}/target/sources</sourceDirectory>
+
+        <plugins>
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-sources</id>
+                        <phase>process-sources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.sourceDirectory}</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/java</directory>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>jdk16</id>
+            <activation>
+                <jdk>1.6</jdk>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>process-sources</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <tasks>
+                                        <replace dir="${project.build.sourceDirectory}">
+                                            <replacetoken><![CDATA[/*replace*/Collection<Callable<T>>]]></replacetoken>
+                                            <replacevalue><![CDATA[Collection<?
extends Callable<T>>]]></replacevalue>
+                                        </replace>
+                                        <replace dir="${project.build.sourceDirectory}">
+                                            <replacetoken><![CDATA[/*replace*/tasks]]></replacetoken>
+                                            <replacevalue><![CDATA[(Collection<Callable<T>>)tasks]]></replacevalue>
+                                        </replace>
+                                    </tasks>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
    
 </project>

Modified: geronimo/server/trunk/plugins/concurrent/geronimo-concurrent-core/src/main/java/org/apache/geronimo/concurrent/executor/AbstractManagedExecutorService.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/concurrent/geronimo-concurrent-core/src/main/java/org/apache/geronimo/concurrent/executor/AbstractManagedExecutorService.java?rev=720519&r1=720518&r2=720519&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/concurrent/geronimo-concurrent-core/src/main/java/org/apache/geronimo/concurrent/executor/AbstractManagedExecutorService.java
(original)
+++ geronimo/server/trunk/plugins/concurrent/geronimo-concurrent-core/src/main/java/org/apache/geronimo/concurrent/executor/AbstractManagedExecutorService.java
Tue Nov 25 08:00:30 2008
@@ -148,10 +148,10 @@
         }
     }
         
-    public <T> T invokeAny(Collection<Callable<T>> tasks) 
+    public <T> T invokeAny(/*replace*/Collection<Callable<T>> tasks) 
         throws InterruptedException,
                ExecutionException {
-        return invokeAny(tasks, null);
+        return invokeAny(/*replace*/tasks, null);
     }       
     
     public <T> T invokeAny(Collection<Callable<T>> tasks, 
@@ -166,11 +166,11 @@
         }
     }
   
-    public <T> T invokeAny(Collection<Callable<T>> tasks, long timeout,
TimeUnit unit)
+    public <T> T invokeAny(/*replace*/Collection<Callable<T>> tasks, long
timeout, TimeUnit unit)
         throws InterruptedException, 
                ExecutionException, 
                TimeoutException {
-        return invokeAny(tasks, timeout, unit, null);
+        return invokeAny(/*replace*/tasks, timeout, unit, null);
     }
     
     public <T> T invokeAny(Collection<Callable<T>> tasks,
@@ -185,9 +185,9 @@
   
     // invokeAll() functions
         
-    public <T> List<Future<T>> invokeAll(Collection<Callable<T>>
tasks) 
+    public <T> List<Future<T>> invokeAll(/*replace*/Collection<Callable<T>>
tasks) 
         throws InterruptedException {
-        return invokeAll(tasks, null);
+        return invokeAll(/*replace*/tasks, null);
     }
     
     public <T> List<Future<T>> invokeAll(Collection<Callable<T>>
tasks,
@@ -226,11 +226,11 @@
         }
     }
 
-    public <T> List<Future<T>> invokeAll(Collection<Callable<T>>
tasks, 
+    public <T> List<Future<T>> invokeAll(/*replace*/Collection<Callable<T>>
tasks, 
                                          long timeout, 
                                          TimeUnit unit)
         throws InterruptedException {
-        return invokeAll(tasks, timeout, unit, null);
+        return invokeAll(/*replace*/tasks, timeout, unit, null);
     }
     
     public <T> List<Future<T>> invokeAll(Collection<Callable<T>>
tasks,

Modified: geronimo/server/trunk/plugins/concurrent/geronimo-concurrent-core/src/main/java/org/apache/geronimo/concurrent/executor/ManagedExecutorServiceFacade.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/concurrent/geronimo-concurrent-core/src/main/java/org/apache/geronimo/concurrent/executor/ManagedExecutorServiceFacade.java?rev=720519&r1=720518&r2=720519&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/concurrent/geronimo-concurrent-core/src/main/java/org/apache/geronimo/concurrent/executor/ManagedExecutorServiceFacade.java
(original)
+++ geronimo/server/trunk/plugins/concurrent/geronimo-concurrent-core/src/main/java/org/apache/geronimo/concurrent/executor/ManagedExecutorServiceFacade.java
Tue Nov 25 08:00:30 2008
@@ -89,25 +89,25 @@
         return this.executor.submit(command, result, listener);
     }
 
-    public <T> List<Future<T>> invokeAll(Collection<Callable<T>>
tasks) 
+    public <T> List<Future<T>> invokeAll(/*replace*/Collection<Callable<T>>
tasks) 
         throws InterruptedException {
         return this.executor.invokeAll(tasks);
     }
 
-    public <T> List<Future<T>> invokeAll(Collection<Callable<T>>
tasks, 
+    public <T> List<Future<T>> invokeAll(/*replace*/Collection<Callable<T>>
tasks, 
                                          long timeout, 
                                          TimeUnit unit)
         throws InterruptedException {
         return this.executor.invokeAll(tasks, timeout, unit);
     }
 
-    public <T> T invokeAny(Collection<Callable<T>> tasks) 
+    public <T> T invokeAny(/*replace*/Collection<Callable<T>> tasks) 
         throws InterruptedException,
                ExecutionException {
         return this.executor.invokeAny(tasks);
     }
 
-    public <T> T invokeAny(Collection<Callable<T>> tasks, 
+    public <T> T invokeAny(/*replace*/Collection<Callable<T>> tasks, 
                            long timeout, 
                            TimeUnit unit)
         throws InterruptedException, 

Modified: geronimo/server/trunk/plugins/concurrent/geronimo-concurrent/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/concurrent/geronimo-concurrent/pom.xml?rev=720519&r1=720518&r2=720519&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/concurrent/geronimo-concurrent/pom.xml (original)
+++ geronimo/server/trunk/plugins/concurrent/geronimo-concurrent/pom.xml Tue Nov 25 08:00:30
2008
@@ -71,4 +71,68 @@
         </dependency>
    </dependencies>
    
+    <build>
+        <sourceDirectory>${basedir}/target/sources</sourceDirectory>
+
+        <plugins>
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-sources</id>
+                        <phase>process-sources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.sourceDirectory}</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/java</directory>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>jdk16</id>
+            <activation>
+                <jdk>1.6</jdk>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>process-sources</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <tasks>
+                                        <replace dir="${project.build.sourceDirectory}">
+                                            <replacetoken><![CDATA[/*replace*/Collection<Callable<T>>]]></replacetoken>
+                                            <replacevalue><![CDATA[Collection<?
extends Callable<T>>]]></replacevalue>
+                                        </replace>
+                                        <replace dir="${project.build.sourceDirectory}">
+                                            <replacetoken><![CDATA[/*replace*/tasks]]></replacetoken>
+                                            <replacevalue><![CDATA[(Collection<Callable<T>>)tasks]]></replacevalue>
+                                        </replace>
+                                    </tasks>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+   
 </project>

Modified: geronimo/server/trunk/plugins/concurrent/geronimo-concurrent/src/main/java/org/apache/geronimo/concurrent/impl/executor/ManagedExecutorServiceModuleFacade.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/concurrent/geronimo-concurrent/src/main/java/org/apache/geronimo/concurrent/impl/executor/ManagedExecutorServiceModuleFacade.java?rev=720519&r1=720518&r2=720519&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/concurrent/geronimo-concurrent/src/main/java/org/apache/geronimo/concurrent/impl/executor/ManagedExecutorServiceModuleFacade.java
(original)
+++ geronimo/server/trunk/plugins/concurrent/geronimo-concurrent/src/main/java/org/apache/geronimo/concurrent/impl/executor/ManagedExecutorServiceModuleFacade.java
Tue Nov 25 08:00:30 2008
@@ -127,7 +127,7 @@
         } 
     }
 
-    public <T> List<Future<T>> invokeAll(Collection<Callable<T>>
tasks) 
+    public <T> List<Future<T>> invokeAll(/*replace*/Collection<Callable<T>>
tasks) 
         throws InterruptedException {
         Object rs = before();
         try {
@@ -137,7 +137,7 @@
         } 
     }
 
-    public <T> List<Future<T>> invokeAll(Collection<Callable<T>>
tasks, 
+    public <T> List<Future<T>> invokeAll(/*replace*/Collection<Callable<T>>
tasks, 
                                          long timeout, 
                                          TimeUnit unit)
         throws InterruptedException {        
@@ -149,7 +149,7 @@
         } 
     }
 
-    public <T> T invokeAny(Collection<Callable<T>> tasks) 
+    public <T> T invokeAny(/*replace*/Collection<Callable<T>> tasks) 
         throws InterruptedException,
                ExecutionException {
         Object rs = before();
@@ -160,7 +160,7 @@
         } 
     }
 
-    public <T> T invokeAny(Collection<Callable<T>> tasks, 
+    public <T> T invokeAny(/*replace*/Collection<Callable<T>> tasks, 
                            long timeout, 
                            TimeUnit unit)
         throws InterruptedException, 



Mime
View raw message