--- libjboss-remoting-java-2.5.2.SP1.orig/debian/rules
+++ libjboss-remoting-java-2.5.2.SP1/debian/rules
@@ -0,0 +1,18 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/ant.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
+
+JAVA_HOME 		:= /usr/lib/jvm/default-java
+DEB_ANT_BUILD_TARGET	:= jar
+DEB_ANT_BUILDFILE	:= debian/build.xml
+DEB_JARS		:= jboss-common log4j-1.2 tomcat-coyote commons-httpclient servlet-api-2.5 \
+  jboss-serialization jboss-jmx jnpserver concurrent
+
+install/libjboss-remoting-java::
+	install -m 644 -D jboss-remoting.jar $(DEB_DESTDIR)/usr/share/java/jboss-remoting-$(DEB_UPSTREAM_VERSION).jar
+	dh_link /usr/share/java/jboss-remoting-$(DEB_UPSTREAM_VERSION).jar /usr/share/java/jboss-remoting.jar
+
+get-orig-source:
+	-uscan --upstream-version 0
--- libjboss-remoting-java-2.5.2.SP1.orig/debian/copyright
+++ libjboss-remoting-java-2.5.2.SP1/debian/copyright
@@ -0,0 +1,86 @@
+This package was debianized by Varun Hiremath <varunhiremath@gmail.com> on
+Tue, 24 Apr 2007 17:19:10 +0530.
+
+It was downloaded from http://labs.jboss.com/jbossremoting/
+
+Upstream Author: JBoss Inc.
+
+Copyright: 
+(C) 2005 JBoss Inc., and authors
+(C) 2006 Red Hat Middleware, LLC, and authors
+
+Authors: 
+    Tom Elrod
+    Ron Sigal
+    Clebert Suconic
+    Jeff Haynie
+    Michael Voss
+
+License:
+    This library is free software; you can redistribute it and/or modify
+    it under the terms of the GNU Lesser General Public License as
+    published by the Free Software Foundation; either version 2.1 of
+    the License, or (at your option) any later version.
+ 
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    On Debian systems, full text of the LGPL license can be found at
+    `/usr/share/common-licenses/LGPL'.
+
+-----
+Files: src/org/jboss/remoting/transport/coyote/*
+
+Copyright: (c) 1999-2002 The Apache Software Foundation.
+
+License:
+    The Apache Software License, Version 1.1
+   
+    Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
+    reserved.
+   
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+   
+    1. Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+   
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in
+       the documentation and/or other materials provided with the
+       distribution.
+   
+    3. The end-user documentation included with the redistribution, if
+       any, must include the following acknowlegement:
+          "This product includes software developed by the
+           Apache Software Foundation (http://www.apache.org/)."
+       Alternately, this acknowlegement may appear in the software itself,
+       if and wherever such third-party acknowlegements normally appear.
+   
+    4. The names "The Jakarta Project", "Commons", and "Apache Software
+       Foundation" must not be used to endorse or promote products derived
+       from this software without prior written permission. For written
+       permission, please contact apache@apache.org.
+   
+    5. Products derived from this software may not be called "Apache"
+       nor may "Apache" appear in their names without prior written
+       permission of the Apache Group.
+   
+    THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+    WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+    OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+    ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+    USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+    OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+    SUCH DAMAGE.
+
+The Debian packaging is copyright (C) 2007, Varun Hiremath <varunhiremath@gmail.com> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
--- libjboss-remoting-java-2.5.2.SP1.orig/debian/watch
+++ libjboss-remoting-java-2.5.2.SP1/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts="uversionmangle=s/_/./g;s/.Beta/~Beta/" \
+http://labs.jboss.com/jbossremoting/ .*jboss-remoting-(2.*)\.zip debian debian/orig-tar.sh
--- libjboss-remoting-java-2.5.2.SP1.orig/debian/orig-tar.sh
+++ libjboss-remoting-java-2.5.2.SP1/debian/orig-tar.sh
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+
+# called by uscan with '--upstream-version' <version> <file>
+TAR=libjboss-remoting-java_$2.orig.tar.gz
+DIR=libjboss-remoting-java-$2.orig
+
+# clean up the upstream tarball
+mkdir $DIR
+(cd $DIR; unzip ../$3; find -type f|xargs perl -pi -e 's/\r$//g')
+GZIP=--best tar -c -z -f $TAR -X debian/orig-tar.exclude $DIR
+rm -rf $DIR $3
+
+# move to directory 'tarballs'
+if [ -r .svn/deb-layout ]; then
+  . .svn/deb-layout
+  mv $TAR $origDir
+  echo "moved $TAR to $origDir"
+fi
--- libjboss-remoting-java-2.5.2.SP1.orig/debian/compat
+++ libjboss-remoting-java-2.5.2.SP1/debian/compat
@@ -0,0 +1 @@
+5
--- libjboss-remoting-java-2.5.2.SP1.orig/debian/README.source
+++ libjboss-remoting-java-2.5.2.SP1/debian/README.source
@@ -0,0 +1,69 @@
+This package uses quilt to manage all modifications to the upstream
+source.  Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+To configure quilt to use debian/patches instead of patches, you want
+either to export QUILT_PATCHES=debian/patches in your environment
+or use this snippet in your ~/.quiltrc:
+
+    for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do
+        if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then
+                export QUILT_PATCHES=debian/patches
+        fi
+    done
+
+To get the fully patched source after unpacking the source package, cd to
+the root level of the source package and run:
+
+    quilt push -a
+
+The last patch listed in debian/patches/series will become the current
+patch.
+
+To add a new set of changes, first run quilt push -a, and then run:
+
+    quilt new <patch>
+
+where <patch> is a descriptive name for the patch, used as the filename in
+debian/patches.  Then, for every file that will be modified by this patch,
+run:
+
+    quilt add <file>
+
+before editing those files.  You must tell quilt with quilt add what files
+will be part of the patch before making changes or quilt will not work
+properly.  After editing the files, run:
+
+    quilt refresh
+
+to save the results as a patch.
+
+Alternately, if you already have an external patch and you just want to
+add it to the build system, run quilt push -a and then:
+
+    quilt import -P <patch> /path/to/patch
+    quilt push -a
+
+(add -p 0 to quilt import if needed). <patch> as above is the filename to
+use in debian/patches.  The last quilt push -a will apply the patch to
+make sure it works properly.
+
+To remove an existing patch from the list of patches that will be applied,
+run:
+
+    quilt delete <patch>
+
+You may need to run quilt pop -a to unapply patches first before running
+this command.
+
+libjboss-remoting-java
+======================
+
+The upstream supplied source package contains binary jar files.
+Currently no clean source distribution exists. Therefore, the upstream
+sources were modified to comply with the Debian Free Software
+Guidelines.
+
+Use the rules/get-orig-source target to create the orig.tar.gz.
+For more details on repackaging of upstream sources please see the 
+debian/orig-tar.sh file.
--- libjboss-remoting-java-2.5.2.SP1.orig/debian/build.xml
+++ libjboss-remoting-java-2.5.2.SP1/debian/build.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project default="jar" name="${project.name}" basedir="..">
+
+  <target name="clean">
+    <delete dir="${class.dir}" quiet="true"/>
+    <delete file="${jar.name}" quiet="true"/>
+  </target>
+
+  <target name="compile">
+    <mkdir dir="${class.dir}"/>
+    <javac srcdir="${source.dir}" destdir="${class.dir}"
+    deprecation="false" debug="true" optimize="true" nowarn="true"/>
+  </target>
+
+  <target name="jar" description="o Create the jar" depends="compile">
+    <jar jarfile="${jar.name}">
+      <fileset dir="${class.dir}">
+          <include name="**"/>
+      </fileset>
+    </jar>
+  </target>
+
+</project>
--- libjboss-remoting-java-2.5.2.SP1.orig/debian/orig-tar.exclude
+++ libjboss-remoting-java-2.5.2.SP1/debian/orig-tar.exclude
@@ -0,0 +1,3 @@
+*/lib/*
+*/docs/api/*
+*.pdf
--- libjboss-remoting-java-2.5.2.SP1.orig/debian/ant.properties
+++ libjboss-remoting-java-2.5.2.SP1/debian/ant.properties
@@ -0,0 +1,4 @@
+project.name=jboss-remoting
+class.dir=class
+source.dir=src
+jar.name=jboss-remoting.jar
--- libjboss-remoting-java-2.5.2.SP1.orig/debian/changelog
+++ libjboss-remoting-java-2.5.2.SP1/debian/changelog
@@ -0,0 +1,71 @@
+libjboss-remoting-java (2.5.2.SP1-2) unstable; urgency=low
+
+  * Replace coyote by tomcat-coyote in debian/rules to support the new tomcat6
+    package. (Closes: #571355)
+
+ -- Torsten Werner <twerner@debian.org>  Sun, 28 Feb 2010 13:15:38 +0100
+
+libjboss-remoting-java (2.5.2.SP1-1) unstable; urgency=low
+
+  * New Upstream release
+  * Updated patch concurrent.diff
+
+ -- Luke Cycon <lcycon@gmail.com>  Wed, 06 Jan 2010 15:13:37 -0800
+
+libjboss-remoting-java (2.5.1-1) unstable; urgency=low
+
+  [ Luke Cycon ]
+  * Bump Standards-Version to 3.8.3
+   - Added debian/README.source (Including debian/README.Debian-source)
+   - Updated debian copyright in debian/copyright
+  * Change package section to java
+  * New patch tomcat6-fix.diff (Closes: #534134)
+   - Fix problems created by API mixup/change
+  * Added patch descriptions to both current patches
+  * Added myself to uploaders
+
+  [ Torsten Werner ]
+  * New upstream release
+  * Refresh patch concurrent.diff.
+  * Lock debian/watch to version 2.x because 3.x is still beta.
+  * Switch to tomcat 6. (Closes: #533150)
+  * Disable compiler warnings.
+  * Switch to default-java.
+
+ -- Luke Cycon <lcycon@gmail.com>  Tue, 15 Sep 2009 18:21:15 -0700
+
+libjboss-remoting-java (2.4.0.SP1+dak1-1) unstable; urgency=low
+
+  * Move package to main.
+
+ -- Torsten Werner <twerner@debian.org>  Tue, 18 Nov 2008 21:10:04 +0100
+
+libjboss-remoting-java (2.4.0.SP1-1) unstable; urgency=low
+
+  * new upstream release
+  * Bump up Standards-Version: 3.8.0 (no changes).
+
+ -- Torsten Werner <twerner@debian.org>  Sat, 08 Nov 2008 23:00:23 +0100
+
+libjboss-remoting-java (2.4.0~Beta2-1) unstable; urgency=low
+
+  * New upstream release
+  * Bump Standards-Version to 3.7.3
+  * Update concurrent.diff patch
+  * Add libconcurrent-java to Build-Depends
+  * Update watch file
+
+ -- Varun Hiremath <varun@debian.org>  Wed, 19 Mar 2008 15:56:52 +0530
+
+libjboss-remoting-java (2.2.0.GA-2) unstable; urgency=low
+
+  * debian/control: Set section to contrib because
+    libjboss-serialization-java is in contrib.
+
+ -- Varun Hiremath <varunhiremath@gmail.com>  Mon, 19 Nov 2007 16:59:06 +0530
+
+libjboss-remoting-java (2.2.0.GA-1) unstable; urgency=low
+
+  * Initial release (Closes: #449358)
+
+ -- Varun Hiremath <varunhiremath@gmail.com>  Tue, 24 Apr 2007 17:19:10 +0530
--- libjboss-remoting-java-2.5.2.SP1.orig/debian/control
+++ libjboss-remoting-java-2.5.2.SP1/debian/control
@@ -0,0 +1,27 @@
+Source: libjboss-remoting-java
+Section: java
+Priority: optional
+Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
+Uploaders: Varun Hiremath <varun@debian.org>, Torsten Werner <twerner@debian.org>, Luke Cycon <lcycon@gmail.com>
+Build-Depends: cdbs, debhelper (>= 5), quilt
+Build-Depends-Indep: ant, default-jdk, libtomcat6-java, libjboss-common-java,
+ libjboss-serialization-java, libservlet2.5-java, libjboss-jmx-java, liblog4j1.2-java,
+ libcommons-httpclient-java, libjboss-naming-java, libconcurrent-java
+Standards-Version: 3.8.3
+Homepage: http://labs.jboss.com/jbossremoting/
+Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/libjboss-remoting-java
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/libjboss-remoting-java
+
+Package: libjboss-remoting-java
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, default-jre | java2-runtime
+Description: JBoss Remoting
+ The purpose of JBoss Remoting is to provide a single API for most
+ network based invocations and related service that uses pluggable
+ transports and data marshallers. The JBoss Remoting API provides the
+ ability for making synchronous and asynchronous remote calls, push
+ and pull callbacks, and automatic discovery of remoting servers. The
+ intention is to allow for the addition of different transports to fit
+ different needs, yet still maintain the same API for making the
+ remote invocations and only requiring configuration changes, not code
+ changes, to fit these different needs.
--- libjboss-remoting-java-2.5.2.SP1.orig/debian/patches/tomcat6-fix.diff
+++ libjboss-remoting-java-2.5.2.SP1/debian/patches/tomcat6-fix.diff
@@ -0,0 +1,16 @@
+A patch by to fix compile errors caused by a tomcat API update
+Patch by Luke Cycon <lcycon@gmail.com>
+--- a/src/org/jboss/remoting/transport/coyote/OutputBuffer.java
++++ b/src/org/jboss/remoting/transport/coyote/OutputBuffer.java
+@@ -607,8 +607,9 @@
+ 
+       // The following has been updated to conform to jbossweb 2.1.
+       cb.setChars(c, off, len);
+-      while (cb.getLength() > 0) { 
+-          conv.convert(cb, bb);
++      while (cb.getLength() > 0) {
++	  conv.setByteChunk(bb);
++	  conv.convert(cb.getChars(), 0, cb.getLength());
+           if (cb.getLength() > 0) {
+               bb.flushBuffer();
+           }
--- libjboss-remoting-java-2.5.2.SP1.orig/debian/patches/concurrent.diff
+++ libjboss-remoting-java-2.5.2.SP1/debian/patches/concurrent.diff
@@ -0,0 +1,605 @@
+A patch to transition to the official Java concurrent packages
+--- a/src/org/jboss/remoting/LeasePinger.java
++++ b/src/org/jboss/remoting/LeasePinger.java
+@@ -8,7 +8,7 @@
+ import java.util.Timer;
+ import java.util.TimerTask;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
++import java.util.concurrent.ConcurrentHashMap;
+ 
+ /**
+  * Internal agent class to ping the remote server to keep lease alive.
+--- a/src/org/jboss/remoting/ServerInvoker.java
++++ b/src/org/jboss/remoting/ServerInvoker.java
+@@ -44,7 +44,7 @@
+ import org.jboss.util.threadpool.ThreadPoolMBean;
+ import org.jboss.logging.Logger;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
++import java.util.concurrent.ConcurrentHashMap;
+ 
+ import javax.management.MBeanServer;
+ import javax.management.MBeanServerInvocationHandler;
+--- a/src/org/jboss/remoting/marshal/encryption/EncryptionManager.java
++++ b/src/org/jboss/remoting/marshal/encryption/EncryptionManager.java
+@@ -21,7 +21,7 @@
+   */
+ package org.jboss.remoting.marshal.encryption;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
++import java.util.concurrent.ConcurrentHashMap;
+ import org.jboss.logging.Logger;
+ 
+ import javax.crypto.Cipher;
+--- a/tests/org/jboss/test/remoting/classloader/InvokerClientTest.java
++++ b/tests/org/jboss/test/remoting/classloader/InvokerClientTest.java
+@@ -58,7 +58,7 @@
+             "javax.servlet.ServletInputStream",
+             "org.apache.coyote.Adapter",
+             "org.jboss.serial.io.JBossObjectOutputStream",
+-            "EDU.oswego.cs.dl.util.concurrent.SynchronizedLong",
++            "java.util.concurrent.SynchronizedLong",
+             "org.jboss.logging.Logger"};
+       URL[] urls = getLibUrls(classUrls);
+       URLClassLoader urlclassloader = new URLClassLoader(urls, null);
+--- a/tests/org/jboss/test/remoting/performance/raw/rmi/MultiThreadedRMIPerformanceClient.java
++++ b/tests/org/jboss/test/remoting/performance/raw/rmi/MultiThreadedRMIPerformanceClient.java
+@@ -22,7 +22,7 @@
+ 
+ package org.jboss.test.remoting.performance.raw.rmi;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ import junit.framework.Test;
+ import org.jboss.jrunit.decorators.ThreadLocalDecorator;
+ import org.jboss.logging.Logger;
+@@ -130,4 +130,4 @@
+       }
+    }
+ 
+-}
+\ No newline at end of file
++}
+--- a/tests/org/jboss/test/remoting/performance/raw/rmi/RMICallbackServer.java
++++ b/tests/org/jboss/test/remoting/performance/raw/rmi/RMICallbackServer.java
+@@ -30,7 +30,7 @@
+ import org.jboss.remoting.callback.HandleCallbackException;
+ import org.jboss.test.remoting.performance.synchronous.PerformanceCallbackKeeper;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ 
+ /**
+  * @author <a href="mailto:tom.elrod@jboss.com">Tom Elrod</a>
+@@ -122,4 +122,4 @@
+          e.printStackTrace();
+       }
+    }
+-}
+\ No newline at end of file
++}
+--- a/tests/org/jboss/test/remoting/performance/raw/rmi/RMIPerformanceClient.java
++++ b/tests/org/jboss/test/remoting/performance/raw/rmi/RMIPerformanceClient.java
+@@ -22,7 +22,7 @@
+ 
+ package org.jboss.test.remoting.performance.raw.rmi;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ import junit.framework.Test;
+ import org.jboss.jrunit.decorators.ThreadLocalDecorator;
+ import org.jboss.logging.Logger;
+@@ -129,4 +129,4 @@
+          throw new Exception("Was not able to find remote method call for " + method);
+       }
+    }
+-}
+\ No newline at end of file
++}
+--- a/tests/org/jboss/test/remoting/performance/raw/rmi/RMIServer.java
++++ b/tests/org/jboss/test/remoting/performance/raw/rmi/RMIServer.java
+@@ -22,7 +22,7 @@
+ 
+ package org.jboss.test.remoting.performance.raw.rmi;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
++import java.util.concurrent.ConcurrentHashMap;
+ import org.jboss.logging.Logger;
+ import org.jboss.test.remoting.performance.synchronous.CallTracker;
+ import org.jboss.test.remoting.performance.synchronous.Payload;
+@@ -132,4 +132,4 @@
+          e.printStackTrace();
+       }
+    }
+-}
+\ No newline at end of file
++}
+--- a/tests/org/jboss/test/remoting/performance/raw/socket/MultiThreadedSocketPerformanceClient.java
++++ b/tests/org/jboss/test/remoting/performance/raw/socket/MultiThreadedSocketPerformanceClient.java
+@@ -22,7 +22,7 @@
+ 
+ package org.jboss.test.remoting.performance.raw.socket;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ import junit.framework.Test;
+ import org.jboss.jrunit.decorators.ThreadLocalDecorator;
+ import org.jboss.logging.Logger;
+@@ -196,4 +196,4 @@
+    }
+ 
+ 
+-}
+\ No newline at end of file
++}
+--- a/tests/org/jboss/test/remoting/performance/raw/socket/SocketCallbackServer.java
++++ b/tests/org/jboss/test/remoting/performance/raw/socket/SocketCallbackServer.java
+@@ -22,7 +22,7 @@
+ 
+ package org.jboss.test.remoting.performance.raw.socket;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ import org.jboss.remoting.callback.Callback;
+ import org.jboss.remoting.callback.HandleCallbackException;
+ import org.jboss.test.remoting.TestUtil;
+@@ -181,4 +181,4 @@
+    }
+ 
+ 
+-}
+\ No newline at end of file
++}
+--- a/tests/org/jboss/test/remoting/performance/raw/socket/SocketPerformanceClient.java
++++ b/tests/org/jboss/test/remoting/performance/raw/socket/SocketPerformanceClient.java
+@@ -22,7 +22,7 @@
+ 
+ package org.jboss.test.remoting.performance.raw.socket;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ import junit.framework.Test;
+ import org.jboss.jrunit.decorators.ThreadLocalDecorator;
+ import org.jboss.logging.Logger;
+@@ -186,4 +186,4 @@
+    }
+ 
+ 
+-}
+\ No newline at end of file
++}
+--- a/tests/org/jboss/test/remoting/performance/raw/socket/SocketServer.java
++++ b/tests/org/jboss/test/remoting/performance/raw/socket/SocketServer.java
+@@ -22,7 +22,7 @@
+ 
+ package org.jboss.test.remoting.performance.raw.socket;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
++import java.util.concurrent.ConcurrentHashMap;
+ import org.jboss.logging.Logger;
+ import org.jboss.test.remoting.performance.synchronous.CallTracker;
+ import org.jboss.test.remoting.performance.synchronous.Payload;
+@@ -283,4 +283,4 @@
+          e.printStackTrace();
+       }
+    }
+-}
+\ No newline at end of file
++}
+--- a/tests/org/jboss/test/remoting/performance/spring/hessian/client/SpringHessianCallbackServer.java
++++ b/tests/org/jboss/test/remoting/performance/spring/hessian/client/SpringHessianCallbackServer.java
+@@ -8,7 +8,7 @@
+  ***************************************/
+ package org.jboss.test.remoting.performance.spring.hessian.client;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ import org.jboss.remoting.callback.InvokerCallbackHandler;
+ import org.jboss.test.remoting.performance.synchronous.PerformanceCallbackKeeper;
+ 
+--- a/tests/org/jboss/test/remoting/performance/spring/hessian/client/SpringHessianCallbackServerImpl.java
++++ b/tests/org/jboss/test/remoting/performance/spring/hessian/client/SpringHessianCallbackServerImpl.java
+@@ -8,7 +8,7 @@
+  ***************************************/
+ package org.jboss.test.remoting.performance.spring.hessian.client;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ import org.jboss.remoting.callback.Callback;
+ import org.jboss.remoting.callback.HandleCallbackException;
+ 
+--- a/tests/org/jboss/test/remoting/performance/spring/hessian/client/SpringHessianPerformanceClient.java
++++ b/tests/org/jboss/test/remoting/performance/spring/hessian/client/SpringHessianPerformanceClient.java
+@@ -8,7 +8,7 @@
+  ***************************************/
+ package org.jboss.test.remoting.performance.spring.hessian.client;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ import junit.framework.Test;
+ import org.jboss.jrunit.decorators.ThreadLocalDecorator;
+ import org.jboss.logging.Logger;
+--- a/tests/org/jboss/test/remoting/performance/spring/hessian/web/SpringHessianServerImpl.java
++++ b/tests/org/jboss/test/remoting/performance/spring/hessian/web/SpringHessianServerImpl.java
+@@ -8,7 +8,7 @@
+  ***************************************/
+ package org.jboss.test.remoting.performance.spring.hessian.web;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
++import java.util.concurrent.ConcurrentHashMap;
+ import org.jboss.test.remoting.performance.synchronous.CallTracker;
+ import org.jboss.test.remoting.performance.synchronous.Payload;
+ 
+--- a/tests/org/jboss/test/remoting/performance/spring/http/client/SpringHttpCallbackServer.java
++++ b/tests/org/jboss/test/remoting/performance/spring/http/client/SpringHttpCallbackServer.java
+@@ -8,7 +8,7 @@
+  ***************************************/
+ package org.jboss.test.remoting.performance.spring.http.client;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ import org.jboss.remoting.callback.InvokerCallbackHandler;
+ import org.jboss.test.remoting.performance.synchronous.PerformanceCallbackKeeper;
+ 
+--- a/tests/org/jboss/test/remoting/performance/spring/http/client/SpringHttpCallbackServerImpl.java
++++ b/tests/org/jboss/test/remoting/performance/spring/http/client/SpringHttpCallbackServerImpl.java
+@@ -8,7 +8,7 @@
+  ***************************************/
+ package org.jboss.test.remoting.performance.spring.http.client;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ import org.jboss.remoting.callback.Callback;
+ import org.jboss.remoting.callback.HandleCallbackException;
+ 
+--- a/tests/org/jboss/test/remoting/performance/spring/http/client/SpringHttpPerformanceClient.java
++++ b/tests/org/jboss/test/remoting/performance/spring/http/client/SpringHttpPerformanceClient.java
+@@ -8,7 +8,7 @@
+  ***************************************/
+ package org.jboss.test.remoting.performance.spring.http.client;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ import junit.framework.Test;
+ import org.jboss.jrunit.decorators.ThreadLocalDecorator;
+ import org.jboss.logging.Logger;
+--- a/tests/org/jboss/test/remoting/performance/spring/http/web/SpringHttpServerImpl.java
++++ b/tests/org/jboss/test/remoting/performance/spring/http/web/SpringHttpServerImpl.java
+@@ -8,7 +8,7 @@
+  ***************************************/
+ package org.jboss.test.remoting.performance.spring.http.web;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
++import java.util.concurrent.ConcurrentHashMap;
+ import org.jboss.test.remoting.performance.synchronous.CallTracker;
+ import org.jboss.test.remoting.performance.synchronous.Payload;
+ 
+--- a/tests/org/jboss/test/remoting/performance/spring/rmi/MultiThreadedSpringRMIPerformanceClient.java
++++ b/tests/org/jboss/test/remoting/performance/spring/rmi/MultiThreadedSpringRMIPerformanceClient.java
+@@ -8,7 +8,7 @@
+  ***************************************/
+ package org.jboss.test.remoting.performance.spring.rmi;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ import junit.framework.Test;
+ import org.jboss.jrunit.decorators.ThreadLocalDecorator;
+ import org.jboss.logging.Logger;
+@@ -208,4 +208,4 @@
+    }
+ 
+ 
+-}
+\ No newline at end of file
++}
+--- a/tests/org/jboss/test/remoting/performance/spring/rmi/SpringRMICallbackServer.java
++++ b/tests/org/jboss/test/remoting/performance/spring/rmi/SpringRMICallbackServer.java
+@@ -8,7 +8,7 @@
+  ***************************************/
+ package org.jboss.test.remoting.performance.spring.rmi;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ import org.jboss.remoting.callback.InvokerCallbackHandler;
+ import org.jboss.test.remoting.performance.synchronous.PerformanceCallbackKeeper;
+ 
+@@ -22,4 +22,4 @@
+    void setClientSessionId(String clientSessionId);
+ 
+    void setServerDoneLock(Latch serverDoneLock);
+-}
+\ No newline at end of file
++}
+--- a/tests/org/jboss/test/remoting/performance/spring/rmi/SpringRMICallbackServerImpl.java
++++ b/tests/org/jboss/test/remoting/performance/spring/rmi/SpringRMICallbackServerImpl.java
+@@ -8,7 +8,7 @@
+  ***************************************/
+ package org.jboss.test.remoting.performance.spring.rmi;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ import org.jboss.remoting.callback.Callback;
+ import org.jboss.remoting.callback.HandleCallbackException;
+ 
+@@ -80,4 +80,4 @@
+ 
+    }
+ 
+-}
+\ No newline at end of file
++}
+--- a/tests/org/jboss/test/remoting/performance/spring/rmi/SpringRMIPerformanceClient.java
++++ b/tests/org/jboss/test/remoting/performance/spring/rmi/SpringRMIPerformanceClient.java
+@@ -8,7 +8,7 @@
+  ***************************************/
+ package org.jboss.test.remoting.performance.spring.rmi;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ import junit.framework.Test;
+ import org.jboss.jrunit.decorators.ThreadLocalDecorator;
+ import org.jboss.logging.Logger;
+@@ -207,4 +207,4 @@
+       }
+    }
+ 
+-}
+\ No newline at end of file
++}
+--- a/tests/org/jboss/test/remoting/performance/spring/rmi/SpringRMIServerImpl.java
++++ b/tests/org/jboss/test/remoting/performance/spring/rmi/SpringRMIServerImpl.java
+@@ -8,7 +8,7 @@
+  ***************************************/
+ package org.jboss.test.remoting.performance.spring.rmi;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
++import java.util.concurrent.ConcurrentHashMap;
+ import org.jboss.test.remoting.performance.synchronous.CallTracker;
+ import org.jboss.test.remoting.performance.synchronous.Payload;
+ 
+@@ -64,4 +64,4 @@
+       return new Integer(clientInvokeCallCount);
+    }
+ 
+-}
+\ No newline at end of file
++}
+--- a/tests/org/jboss/test/remoting/performance/synchronous/CallTracker.java
++++ b/tests/org/jboss/test/remoting/performance/synchronous/CallTracker.java
+@@ -26,7 +26,7 @@
+ import org.jboss.remoting.callback.HandleCallbackException;
+ import org.jboss.remoting.callback.InvokerCallbackHandler;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.SynchronizedInt;
++import java.util.concurrent.SynchronizedInt;
+ 
+ /**
+  * @author <a href="mailto:tom.elrod@jboss.com">Tom Elrod</a>
+@@ -132,4 +132,4 @@
+       return isDuplicate;
+    }
+ 
+-}
+\ No newline at end of file
++}
+--- a/tests/org/jboss/test/remoting/performance/synchronous/MultiThreadedPerformanceClientTest.java
++++ b/tests/org/jboss/test/remoting/performance/synchronous/MultiThreadedPerformanceClientTest.java
+@@ -22,8 +22,8 @@
+ 
+ package org.jboss.test.remoting.performance.synchronous;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
+-import EDU.oswego.cs.dl.util.concurrent.SynchronizedInt;
++import java.util.concurrent.Latch;
++import java.util.concurrent.SynchronizedInt;
+ import junit.framework.Test;
+ import junit.framework.TestCase;
+ import org.jboss.jrunit.controller.ThreadLocalBenchmark;
+--- a/tests/org/jboss/test/remoting/performance/synchronous/PerformanceCallbackHandler.java
++++ b/tests/org/jboss/test/remoting/performance/synchronous/PerformanceCallbackHandler.java
+@@ -26,7 +26,7 @@
+ import org.jboss.remoting.callback.HandleCallbackException;
+ import org.jboss.remoting.callback.InvokerCallbackHandler;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ 
+ /**
+  * @author <a href="mailto:tom.elrod@jboss.com">Tom Elrod</a>
+--- a/tests/org/jboss/test/remoting/performance/synchronous/PerformanceClientTest.java
++++ b/tests/org/jboss/test/remoting/performance/synchronous/PerformanceClientTest.java
+@@ -22,7 +22,7 @@
+ 
+ package org.jboss.test.remoting.performance.synchronous;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Latch;
++import java.util.concurrent.Latch;
+ import junit.framework.Test;
+ import junit.framework.TestCase;
+ import org.jboss.jrunit.controller.ThreadLocalBenchmark;
+--- a/tests/org/jboss/test/remoting/performance/synchronous/PerformanceInvocationHandler.java
++++ b/tests/org/jboss/test/remoting/performance/synchronous/PerformanceInvocationHandler.java
+@@ -34,9 +34,9 @@
+ import org.jboss.remoting.callback.ServerInvokerCallbackHandler;
+ import org.jboss.remoting.invocation.RemoteInvocation;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
+-import EDU.oswego.cs.dl.util.concurrent.FIFOReadWriteLock;
+-import EDU.oswego.cs.dl.util.concurrent.SyncList;
++import java.util.concurrent.ConcurrentHashMap;
++import java.util.concurrent.FIFOReadWriteLock;
++import java.util.concurrent.SyncList;
+ 
+ /**
+  * @author <a href="mailto:tom.elrod@jboss.com">Tom Elrod</a>
+@@ -187,4 +187,4 @@
+       // and then remove from tracker or kill tracker all together.
+       listeners.remove(callbackHandler);
+    }
+-}
+\ No newline at end of file
++}
+--- a/tests/org/jboss/test/remoting/transport/socket/load/PooledConnectionTestCase.java
++++ b/tests/org/jboss/test/remoting/transport/socket/load/PooledConnectionTestCase.java
+@@ -1,6 +1,6 @@
+ package org.jboss.test.remoting.transport.socket.load;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.SynchronizedInt;
++import java.util.concurrent.SynchronizedInt;
+ import junit.framework.TestCase;
+ import org.apache.log4j.Logger;
+ import org.jboss.remoting.Client;
+--- a/tests/org/jboss/test/remoting/transport/socket/timeout/idle/IdleTimeoutClientTest.java
++++ b/tests/org/jboss/test/remoting/transport/socket/timeout/idle/IdleTimeoutClientTest.java
+@@ -1,6 +1,6 @@
+ package org.jboss.test.remoting.transport.socket.timeout.idle;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.SynchronizedInt;
++import java.util.concurrent.SynchronizedInt;
+ import junit.framework.TestCase;
+ import org.apache.log4j.Logger;
+ import org.jboss.remoting.Client;
+--- a/tests/org/jboss/test/remoting/transport/socket/timeout/idle/InactiveIdleTimeoutClientTest.java
++++ b/tests/org/jboss/test/remoting/transport/socket/timeout/idle/InactiveIdleTimeoutClientTest.java
+@@ -1,6 +1,6 @@
+ package org.jboss.test.remoting.transport.socket.timeout.idle;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.SynchronizedInt;
++import java.util.concurrent.SynchronizedInt;
+ import junit.framework.TestCase;
+ import org.apache.log4j.Logger;
+ import org.jboss.remoting.Client;
+--- a/tests/org/jboss/test/remoting/util/PortUtilTestCase.java
++++ b/tests/org/jboss/test/remoting/util/PortUtilTestCase.java
+@@ -24,7 +24,7 @@
+ import org.jboss.remoting.transport.PortUtil;
+ 
+ import junit.framework.TestCase;
+-import EDU.oswego.cs.dl.util.concurrent.SynchronizedInt;
++import java.util.concurrent.SynchronizedInt;
+ 
+ /**
+  * @author <a href="mailto:tom.elrod@jboss.com">Tom Elrod</a>
+@@ -111,4 +111,4 @@
+ 
+    }
+ 
+-}
+\ No newline at end of file
++}
+--- a/src/org/jboss/remoting/transport/bisocket/BisocketClientInvoker.java
++++ b/src/org/jboss/remoting/transport/bisocket/BisocketClientInvoker.java
+@@ -52,7 +52,7 @@
+ import org.jboss.remoting.transport.socket.SocketWrapper;
+ import org.jboss.remoting.util.SecurityUtility;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Semaphore;
++import java.util.concurrent.Semaphore;
+ 
+ /**
+  * The bisocket transport, an extension of the socket transport, is designed to allow
+@@ -781,4 +781,4 @@
+          throw (NoSuchMethodException) e.getCause();
+       }
+    }
+-}
+\ No newline at end of file
++}
+--- a/src/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java
++++ b/src/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java
+@@ -43,7 +43,8 @@
+ import java.util.Properties;
+ import java.util.regex.Pattern;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.Semaphore;
++import java.util.concurrent.Semaphore;
++import java.util.concurrent.TimeUnit;
+ 
+ /**
+  * SocketClientInvoker uses Sockets to remotely connect to the a remote ServerInvoker, which must be
+@@ -511,7 +512,7 @@
+       if (semaphore == null)
+          return 0;
+       
+-      return maxPoolSize - (int) semaphore.permits();
++      return maxPoolSize - (int) semaphore.availablePermits();
+    }
+    
+    public int getNumberOfAvailableConnections()
+@@ -519,7 +520,7 @@
+       if (semaphore == null)
+          return 0;
+       
+-      return (int) semaphore.permits();
++      return (int) semaphore.availablePermits();
+    }
+ 
+    // Package protected ----------------------------------------------------------------------------
+@@ -819,7 +820,7 @@
+          catch (InterruptedException e)
+          {
+             semaphore.release();
+-            if (trace) log.trace(this + " released semaphore: " + semaphore.permits(), e);
++            if (trace) log.trace(this + " released semaphore: " + semaphore.availablePermits(), e);
+             throw new RuntimeException(e);
+          }
+          catch (Exception e)
+@@ -827,7 +828,7 @@
+ //            if (bailOut)
+ //               return null;
+             semaphore.release();
+-            if (trace) log.trace(this + " released semaphore: " + semaphore.permits(), e);
++            if (trace) log.trace(this + " released semaphore: " + semaphore.availablePermits(), e);
+             sockEx =  new CannotConnectException(
+                   "Can not get connection to server. Problem establishing " +
+                   "socket connection for " + locator, e);
+@@ -987,7 +988,7 @@
+             }
+          }         
+          semaphore.release();
+-         if (trace) log.trace(this + " released semaphore: " + semaphore.permits());
++         if (trace) log.trace(this + " released semaphore: " + semaphore.availablePermits());
+       }
+ 
+       if (trace && !oneway) { log.trace(this + " received response " + response);  }
+@@ -1026,7 +1027,7 @@
+       try
+       {
+          semaphore.release();
+-         if (trace) log.trace(this + " released semaphore: " + semaphore.permits());
++         if (trace) log.trace(this + " released semaphore: " + semaphore.availablePermits());
+          socketWrapper.close();            
+       }
+       catch (Exception ex)
+@@ -1066,7 +1067,7 @@
+       try
+       {
+          semaphore.release();
+-         if (trace) log.trace(this + " released semaphore: " + semaphore.permits());
++         if (trace) log.trace(this + " released semaphore: " + semaphore.availablePermits());
+          socketWrapper.close();
+       }
+       catch (Exception ignored)
+@@ -1121,8 +1122,8 @@
+    {
+       long start = System.currentTimeMillis();
+       long timeToWait = (timeAllowed > 0) ? timeAllowed : connectionWait;
+-      boolean timedout = !semaphore.attempt(timeToWait);
+-      if (trace) log.trace(this + " obtained semaphore: " + semaphore.permits());
++      boolean timedout = !semaphore.tryAcquire(timeToWait, TimeUnit.MILLISECONDS);
++      if (trace) log.trace(this + " obtained semaphore: " + semaphore.availablePermits());
+       
+       if (timedout)
+       {
+--- a/tests/org/jboss/test/remoting/transport/socket/interrupt/MockInvokerInterruptTestCase.java
++++ b/tests/org/jboss/test/remoting/transport/socket/interrupt/MockInvokerInterruptTestCase.java
+@@ -32,7 +32,7 @@
+ import org.jboss.remoting.transport.socket.MicroSocketClientInvoker;
+ import org.jboss.remoting.transport.socket.SocketWrapper;
+ 
+-import EDU.oswego.cs.dl.util.concurrent.CountDown;
++import java.util.concurrent.CountDown;
+ 
+ /**
+  * Unit test for JBREM-955.
--- libjboss-remoting-java-2.5.2.SP1.orig/debian/patches/series
+++ libjboss-remoting-java-2.5.2.SP1/debian/patches/series
@@ -0,0 +1,2 @@
+concurrent.diff
+tomcat6-fix.diff
