[jboss-cvs] Repository SVN: r2393 - in oswego-concurrent: 1.3.4.patch01-brew and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jan 23 16:43:29 EST 2008
Author: fnasser at redhat.com
Date: 2008-01-23 16:43:29 -0500 (Wed, 23 Jan 2008)
New Revision: 2393
Added:
oswego-concurrent/1.3.4.patch01-brew/
oswego-concurrent/1.3.4.patch01-brew/component-info.xml
oswego-concurrent/1.3.4.patch01-brew/lib/
oswego-concurrent/1.3.4.patch01-brew/lib/concurrent-src.zip
oswego-concurrent/1.3.4.patch01-brew/lib/concurrent.jar
oswego-concurrent/1.3.4.patch01-brew/src/
oswego-concurrent/1.3.4.patch01-brew/src/README.txt
oswego-concurrent/1.3.4.patch01-brew/src/concurrent-1.3.4-src.tar.gz
oswego-concurrent/1.3.4.patch01-brew/src/concurrent-1.3.4.build.xml
oswego-concurrent/1.3.4.patch01-brew/src/concurrent-ConcurrentHashMap.patch
oswego-concurrent/1.3.4.patch01-brew/src/concurrent-ConcurrentReaderHashMap.patch
oswego-concurrent/1.3.4.patch01-brew/src/concurrent-PooledExecutor.patch
oswego-concurrent/1.3.4.patch01-brew/src/concurrent-build.patch
Log:
Add Brew-built oswego-concurrent 1.3.4.patch01 (fix for JBAS-4698)
Added: oswego-concurrent/1.3.4.patch01-brew/component-info.xml
===================================================================
--- oswego-concurrent/1.3.4.patch01-brew/component-info.xml (rev 0)
+++ oswego-concurrent/1.3.4.patch01-brew/component-info.xml 2008-01-23 21:43:29 UTC (rev 2393)
@@ -0,0 +1,20 @@
+<project name="oswego-concurrent-component-info">
+ <!-- ============================================================ -->
+ <!-- Oswego Concurrent Library -->
+ <!-- ============================================================ -->
+ <component id="oswego-concurrent"
+ licenseType="oswego"
+ version="1.3.4.patch01-brew"
+ projectHome="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html"
+ description="Oswego util.concurrent package"
+ scm=":ext:cvs.devel.redhat.com:/cvs/dist/concurrent"
+ tag="concurrent-1_3_4-7jpp_ep1_4_el4">
+ <!-- Built using JDK 1.4 -->
+
+ <artifact id="concurrent.jar"/>
+ <artifact id="concurrent-src.zip"/>
+ <export>
+ <include input="concurrent.jar"/>
+ </export>
+ </component>
+</project>
Added: oswego-concurrent/1.3.4.patch01-brew/lib/concurrent-src.zip
===================================================================
(Binary files differ)
Property changes on: oswego-concurrent/1.3.4.patch01-brew/lib/concurrent-src.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: oswego-concurrent/1.3.4.patch01-brew/lib/concurrent.jar
===================================================================
(Binary files differ)
Property changes on: oswego-concurrent/1.3.4.patch01-brew/lib/concurrent.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: oswego-concurrent/1.3.4.patch01-brew/src/README.txt
===================================================================
--- oswego-concurrent/1.3.4.patch01-brew/src/README.txt (rev 0)
+++ oswego-concurrent/1.3.4.patch01-brew/src/README.txt 2008-01-23 21:43:29 UTC (rev 2393)
@@ -0,0 +1,13 @@
+This is the latest version of oswego concurrent
+compiled with jdk1.4
+
+# Merge JBAS-4698
+# This effectively fixes the oswego library.
+# Several defects were found, including an unthreadsafe call to toArray()
+Patch1: concurrent-ConcurrentHashMap.patch
+Patch2: concurrent-ConcurrentReaderHashMap.patch
+
+The patches enable debug for the generated code
+and apply the unreleased fixes to
+ConcurrentHashMap and PooledExecutor mentioned here:
+http://g.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
Added: oswego-concurrent/1.3.4.patch01-brew/src/concurrent-1.3.4-src.tar.gz
===================================================================
(Binary files differ)
Property changes on: oswego-concurrent/1.3.4.patch01-brew/src/concurrent-1.3.4-src.tar.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: oswego-concurrent/1.3.4.patch01-brew/src/concurrent-1.3.4.build.xml
===================================================================
--- oswego-concurrent/1.3.4.patch01-brew/src/concurrent-1.3.4.build.xml (rev 0)
+++ oswego-concurrent/1.3.4.patch01-brew/src/concurrent-1.3.4.build.xml 2008-01-23 21:43:29 UTC (rev 2393)
@@ -0,0 +1,45 @@
+<project name="concurrent" default="jar" basedir=".">
+
+ <property name="src" value="src"/>
+ <property name="docs" value="docs"/>
+ <property name="build" value="build"/>
+ <property name="j2se.apiurl"
+ value="http://java.sun.com/j2se/1.4/docs/api/"/>
+
+ <target name="init">
+ <mkdir dir="${build}"/>
+ </target>
+
+ <target name="compile" depends="init">
+ <javac srcdir="${src}"
+ debug="on"
+ optimize="on"
+ destdir="${build}"
+ />
+ </target>
+
+ <target name="jar" depends="compile">
+ <jar jarfile="concurrent-${version}.jar"
+ basedir="${build}"
+ />
+ </target>
+
+ <target name="javadoc">
+ <mkdir dir="${docs}"/>
+ <javadoc destdir="${docs}"
+ packagenames = "EDU.oswego.cs.dl.util.concurrent,EDU.oswego.cs.dl.util.concurrent.misc.*"
+ sourcepath="${src}"
+ private="off"
+ >
+ <link href="${j2se.apiurl}"/>
+ </javadoc>
+ </target>
+
+ <target name="clean">
+ <delete dir="${build}"/>
+ <delete>
+ <fileset dir="." includes="concurrent-*.jar"/>
+ </delete>
+ </target>
+
+</project>
Added: oswego-concurrent/1.3.4.patch01-brew/src/concurrent-ConcurrentHashMap.patch
===================================================================
--- oswego-concurrent/1.3.4.patch01-brew/src/concurrent-ConcurrentHashMap.patch (rev 0)
+++ oswego-concurrent/1.3.4.patch01-brew/src/concurrent-ConcurrentHashMap.patch 2008-01-23 21:43:29 UTC (rev 2393)
@@ -0,0 +1,119 @@
+Index: src/EDU/oswego/cs/dl/util/concurrent/ConcurrentHashMap.java
+===================================================================
+--- src/EDU/oswego/cs/dl/util/concurrent/ConcurrentHashMap.java (revision 4)
++++ src/EDU/oswego/cs/dl/util/concurrent/ConcurrentHashMap.java (working copy)
+@@ -21,6 +21,7 @@
+ 12jan2001 dl public release
+ 17nov2001 dl Minor tunings
+ 24oct2003 dl Segment implements Serializable
++ 23jun2004 dl Avoid bad array sizings in view toArray methods
+ */
+
+ package EDU.oswego.cs.dl.util.concurrent;
+@@ -31,6 +32,7 @@
+ import java.util.AbstractCollection;
+ import java.util.Collection;
+ import java.util.Set;
++import java.util.ArrayList;
+ import java.util.Iterator;
+ import java.util.Enumeration;
+ import java.util.NoSuchElementException;
+@@ -879,6 +881,32 @@
+ public void clear() {
+ ConcurrentHashMap.this.clear();
+ }
++ public Object[] toArray() {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray();
++ }
++ public Object[] toArray(Object[] a) {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray(a);
++ }
+ }
+
+ /**
+@@ -911,6 +939,32 @@
+ public void clear() {
+ ConcurrentHashMap.this.clear();
+ }
++ public Object[] toArray() {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray();
++ }
++ public Object[] toArray(Object[] a) {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray(a);
++ }
+ }
+
+ /**
+@@ -954,6 +1008,32 @@
+ public void clear() {
+ ConcurrentHashMap.this.clear();
+ }
++ public Object[] toArray() {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray();
++ }
++ public Object[] toArray(Object[] a) {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray(a);
++ }
+ }
+
+ /**
Added: oswego-concurrent/1.3.4.patch01-brew/src/concurrent-ConcurrentReaderHashMap.patch
===================================================================
--- oswego-concurrent/1.3.4.patch01-brew/src/concurrent-ConcurrentReaderHashMap.patch (rev 0)
+++ oswego-concurrent/1.3.4.patch01-brew/src/concurrent-ConcurrentReaderHashMap.patch 2008-01-23 21:43:29 UTC (rev 2393)
@@ -0,0 +1,118 @@
+Index: src/EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap.java
+===================================================================
+--- src/EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap.java (revision 3)
++++ src/EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap.java (working copy)
+@@ -28,6 +28,7 @@
+
+ package EDU.oswego.cs.dl.util.concurrent;
+
++import java.util.ArrayList;
+ import java.util.Map;
+ import java.util.AbstractMap;
+ import java.util.AbstractSet;
+@@ -901,6 +902,34 @@
+ public void clear() {
+ ConcurrentReaderHashMap.this.clear();
+ }
++
++ public Object[] toArray() {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray();
++ }
++
++ public Object[] toArray(Object[] a) {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray(a);
++ }
+ }
+
+ /**
+@@ -933,6 +962,35 @@
+ public void clear() {
+ ConcurrentReaderHashMap.this.clear();
+ }
++
++ public Object[] toArray() {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray();
++ }
++
++ public Object[] toArray(Object[] a) {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray(a);
++ }
++
+ }
+
+ /**
+@@ -975,6 +1033,34 @@
+ public void clear() {
+ ConcurrentReaderHashMap.this.clear();
+ }
++
++ public Object[] toArray() {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray();
++ }
++
++ public Object[] toArray(Object[] a) {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray(a);
++ }
+ }
+
+ /**
Added: oswego-concurrent/1.3.4.patch01-brew/src/concurrent-PooledExecutor.patch
===================================================================
--- oswego-concurrent/1.3.4.patch01-brew/src/concurrent-PooledExecutor.patch (rev 0)
+++ oswego-concurrent/1.3.4.patch01-brew/src/concurrent-PooledExecutor.patch 2008-01-23 21:43:29 UTC (rev 2393)
@@ -0,0 +1,47 @@
+--- src/EDU/oswego/cs/dl/util/concurrent/PooledExecutor.java 2007-09-11 14:32:37.000000000 +0200
++++ /home/ejort/temp/PooledExecutor.java 2005-07-15 20:47:08.000000000 +0200
+@@ -27,10 +27,11 @@
+ Simplify locking scheme
+ 25jan2001 dl {get,set}BlockedExecutionHandler now public
+ 17may2002 dl null out task var in worker run to enable GC.
+ 30aug2003 dl check for new tasks when timing out
+ 18feb2004 dl replace dead thread if no others left
++ 23jun2004 dl fix shutdownAfterProcessingCurrentlyQueuedTasks
+ */
+
+ package EDU.oswego.cs.dl.util.concurrent;
+ import java.util.*;
+
+@@ -589,15 +590,27 @@
+ * Terminate threads after processing all elements currently in
+ * queue. Any tasks entered after this point will be handled by the
+ * given BlockedExecutionHandler. A shut down pool cannot be
+ * restarted.
+ **/
+- public synchronized void shutdownAfterProcessingCurrentlyQueuedTasks(BlockedExecutionHandler handler) {
+- setBlockedExecutionHandler(handler);
+- shutdown_ = true;
+- if (poolSize_ == 0) // disable new thread construction when idle
+- minimumPoolSize_ = maximumPoolSize_ = 0;
++ public void shutdownAfterProcessingCurrentlyQueuedTasks(BlockedExecutionHandler handler) {
++ synchronized(this) {
++ setBlockedExecutionHandler(handler);
++ shutdown_ = true;
++ if (poolSize_ == 0) // disable new thread construction when idle
++ minimumPoolSize_ = maximumPoolSize_ = 0;
++ }
++ // Try to add a final task to interrupt remaining threads waiting
++ // on handoff that will never otherwise get new tasks. If the
++ // offer fails, no threads such could be waiting
++ try {
++ Runnable r = new Runnable() { public void run() { interruptAll(); }};
++ handOff_.offer(r, 0);
++ }
++ catch(InterruptedException ie) {
++ Thread.currentThread().interrupt();
++ }
+ }
+
+ /**
+ * Return true if a shutDown method has succeeded in terminating all
+ * threads.
Added: oswego-concurrent/1.3.4.patch01-brew/src/concurrent-build.patch
===================================================================
--- oswego-concurrent/1.3.4.patch01-brew/src/concurrent-build.patch (rev 0)
+++ oswego-concurrent/1.3.4.patch01-brew/src/concurrent-build.patch 2008-01-23 21:43:29 UTC (rev 2393)
@@ -0,0 +1,19 @@
+*** build.xml.orig 2007-03-23 13:38:19.000000000 -0400
+--- build.xml 2007-03-23 13:39:30.000000000 -0400
+***************
+*** 42,48 ****
+ </target>
+
+ <target name="compile" depends="setup.packages">
+! <javac srcdir="src" destdir="build" optimize="true"/>
+ </target>
+
+ <target name="dist" depends="compile">
+--- 42,48 ----
+ </target>
+
+ <target name="compile" depends="setup.packages">
+! <javac srcdir="src" destdir="build" debug="on" optimize="true"/>
+ </target>
+
+ <target name="dist" depends="compile">
More information about the jboss-cvs-commits
mailing list