You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ru...@apache.org on 2008/02/20 17:05:08 UTC

svn commit: r629518 [1/7] - in /incubator/qpid/branches/M2.1/java: ./ broker/src/main/java/org/apache/qpid/server/plugins/ broker/src/main/java/org/apache/qpid/server/txn/ client-java14/ client/ client/src/main/java/org/apache/qpid/client/ client/src/t...

Author: rupertlssmith
Date: Wed Feb 20 08:04:25 2008
New Revision: 629518

URL: http://svn.apache.org/viewvc?rev=629518&view=rev
Log:
QPID-800 : junit toolkit sources added.

Added:
    incubator/qpid/branches/M2.1/java/junit-toolkit/
    incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/
    incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/pom.xml
    incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/
    incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/
    incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/
    incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/
    incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/
    incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/
    incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/
    incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/IsolatedClassLoader.java
    incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/TKTestRunnerMojo.java
    incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/TKTestScriptGenMojo.java
    incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/uk/
    incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/uk/co/
    incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/uk/co/thebadgerset/
    incubator/qpid/branches/M2.1/java/junit-toolkit/pom.xml
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/DefaultThreadFactory.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/PossibleDeadlockException.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/TestRunnable.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/ThreadTestCoordinator.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/ThreadTestExample.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/package.html
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/AsymptoticTestCase.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/AsymptoticTestDecorator.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/BaseThrottle.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/BatchedThrottle.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/DurationTestDecorator.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/InstrumentedTest.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/NullResultPrinter.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/ParameterVariationTestDecorator.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/ScaledTestDecorator.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/SetupTaskAware.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/SetupTaskHandler.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/ShutdownHookable.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/SleepThrottle.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/TKTestResult.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/TKTestRunner.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/TestRunnerImprovedErrorHandling.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/TestThreadAware.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/Throttle.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/TimingController.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/TimingControllerAware.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/WrappedSuiteTestDecorator.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/listeners/
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/listeners/CSVTestListener.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/listeners/ConsoleTestListener.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/listeners/TKTestListener.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/listeners/XMLTestListener.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/listeners/package.html
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/package.html
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/CommandLineParser.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/ContextualProperties.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/MathUtils.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/ParsedProperties.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/SizeOf.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/StackQueue.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/TestContextProperties.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/TestUtils.java
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/package.html
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/uk/
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/uk/co/
    incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/uk/co/thebadgerset/
Modified:
    incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java
    incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/txn/TransactionalContext.java
    incubator/qpid/branches/M2.1/java/client-java14/pom.xml
    incubator/qpid/branches/M2.1/java/client/pom.xml
    incubator/qpid/branches/M2.1/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
    incubator/qpid/branches/M2.1/java/client/src/test/java/org/apache/qpid/test/unit/close/CloseBeforeAckTest.java
    incubator/qpid/branches/M2.1/java/integrationtests/pom.xml
    incubator/qpid/branches/M2.1/java/perftests/distribution/pom.xml
    incubator/qpid/branches/M2.1/java/perftests/etc/scripts/PT-Qpid-13.sh
    incubator/qpid/branches/M2.1/java/perftests/etc/scripts/PT-Qpid-14.sh
    incubator/qpid/branches/M2.1/java/perftests/etc/scripts/Test-ActiveMQ.sh
    incubator/qpid/branches/M2.1/java/perftests/etc/scripts/Test-SwiftMQ.sh
    incubator/qpid/branches/M2.1/java/perftests/pom.xml
    incubator/qpid/branches/M2.1/java/perftests/src/main/java/org/apache/qpid/ping/PingAsyncTestPerf.java
    incubator/qpid/branches/M2.1/java/perftests/src/main/java/org/apache/qpid/ping/PingDurableClient.java
    incubator/qpid/branches/M2.1/java/perftests/src/main/java/org/apache/qpid/ping/PingLatencyTestPerf.java
    incubator/qpid/branches/M2.1/java/perftests/src/main/java/org/apache/qpid/ping/PingTestPerf.java
    incubator/qpid/branches/M2.1/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java
    incubator/qpid/branches/M2.1/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongTestPerf.java
    incubator/qpid/branches/M2.1/java/perftests/src/main/java/org/apache/qpid/test/testcases/MessageThroughputPerf.java
    incubator/qpid/branches/M2.1/java/plugins/pom.xml
    incubator/qpid/branches/M2.1/java/plugins/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchange.java
    incubator/qpid/branches/M2.1/java/pom.xml
    incubator/qpid/branches/M2.1/java/systests/pom.xml
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/server/plugins/PluginTest.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/AMQPPublisher.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/FrameworkBaseCase.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/LocalAMQPCircuitFactory.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/LocalCircuitFactory.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/MessagingTestConfigProperties.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/NotApplicableAssertion.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/Publisher.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/Receiver.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/TestUtils.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/clocksynch/ClockSynchThread.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/clocksynch/UDPClockReference.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/clocksynch/UDPClockSynchronizer.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/distributedcircuit/DistributedCircuitImpl.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/distributedcircuit/DistributedPublisherImpl.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/distributedcircuit/DistributedReceiverImpl.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/distributedcircuit/TestClientCircuitEnd.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/Coordinator.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/DistributedTestDecorator.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/FanOutTestDecorator.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/InteropTestDecorator.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/listeners/XMLTestListener.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalAMQPPublisherImpl.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalCircuitImpl.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalPublisherImpl.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalReceiverImpl.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/qpid/AMQPFeatureDecorator.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/qpid/CauseFailureDecorator.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/qpid/InVMBrokerDecorator.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/CircuitFactory.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/FanOutCircuitFactory.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/InteropCircuitFactory.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/testcases/ImmediateMessageTest.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/testcases/MandatoryMessageTest.java
    incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/test/testcases/RollbackTest.java

Modified: incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java?rev=629518&r1=629517&r2=629518&view=diff
==============================================================================
--- incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java (original)
+++ incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java Wed Feb 20 08:04:25 2008
@@ -21,7 +21,6 @@
 
 import java.io.File;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -30,7 +29,6 @@
 import org.apache.felix.framework.cache.BundleCache;
 import org.apache.felix.framework.util.FelixConstants;
 import org.apache.felix.framework.util.StringMap;
-import org.apache.qpid.server.exchange.Exchange;
 import org.apache.qpid.server.exchange.ExchangeType;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleException;
@@ -72,7 +70,7 @@
                 "org.apache.qpid.server.queue; version=0.2.1," +
                 "javax.management.openmbean; version=1.0.0,"+
                 "javax.management; version=1.0.0,"+
-                "uk.co.thebadgerset.junit.extensions.util; version=0.6.1,"                
+                "org.apache.qpid.junit.extensions.util; version=0.6.1,"
                 );
         
         if (plugindir == null)

Modified: incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/txn/TransactionalContext.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/txn/TransactionalContext.java?rev=629518&r1=629517&r2=629518&view=diff
==============================================================================
--- incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/txn/TransactionalContext.java (original)
+++ incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/txn/TransactionalContext.java Wed Feb 20 08:04:25 2008
@@ -24,7 +24,6 @@
 import org.apache.qpid.server.ack.UnacknowledgedMessageMap;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.AMQMessage;
-import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.queue.QueueEntry;
 import org.apache.qpid.server.store.StoreContext;
 

Modified: incubator/qpid/branches/M2.1/java/client-java14/pom.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/client-java14/pom.xml?rev=629518&r1=629517&r2=629518&view=diff
==============================================================================
--- incubator/qpid/branches/M2.1/java/client-java14/pom.xml (original)
+++ incubator/qpid/branches/M2.1/java/client-java14/pom.xml Wed Feb 20 08:04:25 2008
@@ -1,224 +1,224 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements. See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership. The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License. You may obtain a copy of the License at
-    
-    http://www.apache.org/licenses/LICENSE-2.0
-    
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-    KIND, either express or implied. See the License for the
-    specific language governing permissions and limitations
-    under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.apache.qpid</groupId>
-    <artifactId>qpid-client-java14</artifactId>
-    <packaging>jar</packaging>
-    <version>1.0-incubating-M2.1-SNAPSHOT</version>
-    <name>Qpid Client for Java 1.4</name>
-    <url>http://cwiki.apache.org/confluence/display/qpid</url>
-
-    <parent>
-        <groupId>org.apache.qpid</groupId>
-        <artifactId>qpid</artifactId>
-        <version>1.0-incubating-M2.1-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <properties>
-        <topDirectoryLocation>..</topDirectoryLocation>
-        <java.source.version>1.4</java.source.version>
-        <qpid.version>${pom.version}</qpid.version>
-        <qpid.targetDir>${project.build.directory}</qpid.targetDir>
-        <!--<qpid.root>${basedir}/..</qpid.root>-->
-        <sasl.properties>${basedir}/etc/sasl.properties</sasl.properties>
-
-        <!-- This is a dummy value to ensure this property exists, override in your settings.xml to your real 1.4 jdk location to run tests. -->
-        <jvm.1.4.bin>path/to/java1.4</jvm.1.4.bin>
-    </properties>
-
-    <dependencies>
-
-        <!-- These dependencies have to be re-declared here, because exluding the normal (non 1.4) client and common from the distribution takes out
-             these transitive dependencies too. -->
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-simple</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.mina</groupId>
-            <artifactId>mina-core</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jms_1.1_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-collections</groupId>
-            <artifactId>commons-collections</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-lang</groupId>
-            <artifactId>commons-lang</artifactId>
-        </dependency>
-
-        <!-- Use the java 1.4 retrotranslated client. -->
-        <dependency>
-            <groupId>org.apache.qpid</groupId>
-            <artifactId>qpid-client</artifactId>
-            <type>jar</type>
-            <version>${pom.version}</version>
-            <classifier>java14</classifier>
-        </dependency>
-
-        <!-- Use the java 1.4 retrotranslated common library. -->
-        <dependency>
-            <groupId>org.apache.qpid</groupId>
-            <artifactId>qpid-common</artifactId>
-            <type>jar</type>
-            <version>${pom.version}</version>
-            <classifier>java14</classifier>
-        </dependency>
-
-        <!-- Use the java 1.4 retrotranslated integration tests. -->
-        <dependency>
-            <groupId>org.apache.qpid</groupId>
-            <artifactId>qpid-integrationtests</artifactId>
-            <type>jar</type>
-            <version>${pom.version}</version>
-            <classifier>java14</classifier>
-            <!--<scope>test</scope>-->
-        </dependency>
-
-        <dependency>
-            <groupId>net.sf.retrotranslator</groupId>                
-            <artifactId>retrotranslator-runtime</artifactId>
-            <scope>package</scope>
-        </dependency>
-
-        <!-- Test dependencies. -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-    </dependencies>
-
-    <build>
-        <plugins>
-
-            <!-- Sets up the compiler plugin to compile on 1.4 -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>${java.source.version}</source>
-                    <target>${java.source.version}</target>
-                </configuration>
-            </plugin>
-
-            <!-- Sets up the assembly plugin to use the assembly directions to build a 1.4 compatable client. -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>${assembly.version}</version>
-
-                <executions>
-
-                    <!-- Produces the distribution. -->
-                    <execution>
-                        <id>assembly-dist</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>attached</goal>
-                        </goals>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>src/main/assembly/client-java14-bin.xml</descriptor>
-                            </descriptors>
-                            <finalName>qpid-${pom.version}</finalName>
-                            <outputDirectory>${qpid.targetDir}</outputDirectory>
-                            <tarLongFileMode>gnu</tarLongFileMode>
-                        </configuration>
-                    </execution>
-                    
-                    <!-- Produces a jar with all test dependencies in it. For convenience in running tests from command line. -->
-                    <!-- Todo: Replace this with a manifest only jar, its much quicker to build that. -->
-                    <execution>
-                        <id>assembly-alltestdeps</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>attached</goal>
-                        </goals>
-                        <configuration>
-                            <descriptors>
-                                <descriptor>src/main/assembly/jar-with-dependencies.xml</descriptor>
-                            </descriptors>
-                            <outputDirectory>target</outputDirectory>
-                            <workDirectory>target/assembly/work</workDirectory>
-                        </configuration>              
-                    </execution>
-
-                </executions>
-            </plugin>
-
-            <!-- Sets up surefire to run during the integration-test phase instead of the test phase. -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>surefire-it</id>
-                        <phase>integration-test</phase>
-                        <goals>
-                            <goal>test</goal>
-                        </goals>
-                        <configuration>
-                            <skip>true</skip>
-                            <forkMode>once</forkMode>
-                            <jvm>${jvm.1.4.bin}</jvm>
-                            <systemProperties>
-                                <property>
-                                    <name>amqj.logging.level</name>
-                                    <value>${amqj.logging.level}</value>
-                                </property>
-                                <property>
-                                    <name>log4j.configuration</name>
-                                    <value>${log4j.configuration}</value>
-                                </property>
-                                <property>
-                                    <name>amq.dynamicsaslregistrar.properties</name>
-                                    <value>${sasl.properties}</value>
-                                </property>
-                            </systemProperties>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-        </plugins>
-    </build>
-</project>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License. You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied. See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.qpid</groupId>
+    <artifactId>qpid-client-java14</artifactId>
+    <packaging>jar</packaging>
+    <version>1.0-incubating-M2.1-SNAPSHOT</version>
+    <name>Qpid Client for Java 1.4</name>
+    <url>http://cwiki.apache.org/confluence/display/qpid</url>
+
+    <parent>
+        <groupId>org.apache.qpid</groupId>
+        <artifactId>qpid</artifactId>
+        <version>1.0-incubating-M2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <properties>
+        <topDirectoryLocation>..</topDirectoryLocation>
+        <java.source.version>1.4</java.source.version>
+        <qpid.version>${pom.version}</qpid.version>
+        <qpid.targetDir>${project.build.directory}</qpid.targetDir>
+        <!--<qpid.root>${basedir}/..</qpid.root>-->
+        <sasl.properties>${basedir}/etc/sasl.properties</sasl.properties>
+
+        <!-- This is a dummy value to ensure this property exists, override in your settings.xml to your real 1.4 jdk location to run tests. -->
+        <jvm.1.4.bin>path/to/java1.4</jvm.1.4.bin>
+    </properties>
+
+    <dependencies>
+
+        <!-- These dependencies have to be re-declared here, because exluding the normal (non 1.4) client and common from the distribution takes out
+             these transitive dependencies too. -->
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.mina</groupId>
+            <artifactId>mina-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jms_1.1_spec</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+        </dependency>
+
+        <!-- Use the java 1.4 retrotranslated client. -->
+        <dependency>
+            <groupId>org.apache.qpid</groupId>
+            <artifactId>qpid-client</artifactId>
+            <type>jar</type>
+            <version>${pom.version}</version>
+            <classifier>java14</classifier>
+        </dependency>
+
+        <!-- Use the java 1.4 retrotranslated common library. -->
+        <dependency>
+            <groupId>org.apache.qpid</groupId>
+            <artifactId>qpid-common</artifactId>
+            <type>jar</type>
+            <version>${pom.version}</version>
+            <classifier>java14</classifier>
+        </dependency>
+
+        <!-- Use the java 1.4 retrotranslated integration tests. -->
+        <dependency>
+            <groupId>org.apache.qpid</groupId>
+            <artifactId>qpid-integrationtests</artifactId>
+            <type>jar</type>
+            <version>${pom.version}</version>
+            <classifier>java14</classifier>
+            <!--<scope>test</scope>-->
+        </dependency>
+
+        <dependency>
+            <groupId>net.sf.retrotranslator</groupId>                
+            <artifactId>retrotranslator-runtime</artifactId>
+            <scope>package</scope>
+        </dependency>
+
+        <!-- Test dependencies. -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+
+            <!-- Sets up the compiler plugin to compile on 1.4 -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>${java.source.version}</source>
+                    <target>${java.source.version}</target>
+                </configuration>
+            </plugin>
+
+            <!-- Sets up the assembly plugin to use the assembly directions to build a 1.4 compatable client. -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>${assembly.version}</version>
+
+                <executions>
+
+                    <!-- Produces the distribution. -->
+                    <execution>
+                        <id>assembly-dist</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attached</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/assembly/client-java14-bin.xml</descriptor>
+                            </descriptors>
+                            <finalName>qpid-${pom.version}</finalName>
+                            <outputDirectory>${qpid.targetDir}</outputDirectory>
+                            <tarLongFileMode>gnu</tarLongFileMode>
+                        </configuration>
+                    </execution>
+                    
+                    <!-- Produces a jar with all test dependencies in it. For convenience in running tests from command line. -->
+                    <!-- Todo: Replace this with a manifest only jar, its much quicker to build that. -->
+                    <execution>
+                        <id>assembly-alltestdeps</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attached</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/assembly/jar-with-dependencies.xml</descriptor>
+                            </descriptors>
+                            <outputDirectory>target</outputDirectory>
+                            <workDirectory>target/assembly/work</workDirectory>
+                        </configuration>              
+                    </execution>
+
+                </executions>
+            </plugin>
+
+            <!-- Sets up surefire to run during the integration-test phase instead of the test phase. -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>surefire-it</id>
+                        <phase>integration-test</phase>
+                        <goals>
+                            <goal>test</goal>
+                        </goals>
+                        <configuration>
+                            <skip>true</skip>
+                            <forkMode>once</forkMode>
+                            <jvm>${jvm.1.4.bin}</jvm>
+                            <systemProperties>
+                                <property>
+                                    <name>amqj.logging.level</name>
+                                    <value>${amqj.logging.level}</value>
+                                </property>
+                                <property>
+                                    <name>log4j.configuration</name>
+                                    <value>${log4j.configuration}</value>
+                                </property>
+                                <property>
+                                    <name>amq.dynamicsaslregistrar.properties</name>
+                                    <value>${sasl.properties}</value>
+                                </property>
+                            </systemProperties>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+        </plugins>
+    </build>
+</project>

Modified: incubator/qpid/branches/M2.1/java/client/pom.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/client/pom.xml?rev=629518&r1=629517&r2=629518&view=diff
==============================================================================
--- incubator/qpid/branches/M2.1/java/client/pom.xml (original)
+++ incubator/qpid/branches/M2.1/java/client/pom.xml Wed Feb 20 08:04:25 2008
@@ -79,7 +79,7 @@
         </dependency>
 
         <dependency>
-            <groupId>uk.co.thebadgerset</groupId>
+            <groupId>org.apache.qpid</groupId>
             <artifactId>junit-toolkit</artifactId>
             <scope>test</scope>
         </dependency>

Modified: incubator/qpid/branches/M2.1/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/client/src/main/java/org/apache/qpid/client/AMQSession.java?rev=629518&r1=629517&r2=629518&view=diff
==============================================================================
--- incubator/qpid/branches/M2.1/java/client/src/main/java/org/apache/qpid/client/AMQSession.java (original)
+++ incubator/qpid/branches/M2.1/java/client/src/main/java/org/apache/qpid/client/AMQSession.java Wed Feb 20 08:04:25 2008
@@ -43,7 +43,6 @@
 import org.apache.qpid.common.AMQPFilterTypes;
 import org.apache.qpid.framing.*;
 import org.apache.qpid.framing.amqp_0_9.MethodRegistry_0_9;
-import org.apache.qpid.framing.amqp_8_0.MethodRegistry_8_0;
 import org.apache.qpid.jms.Session;
 import org.apache.qpid.protocol.AMQConstant;
 import org.apache.qpid.protocol.AMQMethodEvent;

Modified: incubator/qpid/branches/M2.1/java/client/src/test/java/org/apache/qpid/test/unit/close/CloseBeforeAckTest.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/client/src/test/java/org/apache/qpid/test/unit/close/CloseBeforeAckTest.java?rev=629518&r1=629517&r2=629518&view=diff
==============================================================================
--- incubator/qpid/branches/M2.1/java/client/src/test/java/org/apache/qpid/test/unit/close/CloseBeforeAckTest.java (original)
+++ incubator/qpid/branches/M2.1/java/client/src/test/java/org/apache/qpid/test/unit/close/CloseBeforeAckTest.java Wed Feb 20 08:04:25 2008
@@ -29,8 +29,8 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import uk.co.thebadgerset.junit.concurrency.TestRunnable;
-import uk.co.thebadgerset.junit.concurrency.ThreadTestCoordinator;
+import org.apache.qpid.junit.concurrency.TestRunnable;
+import org.apache.qpid.junit.concurrency.ThreadTestCoordinator;
 
 import javax.jms.Connection;
 import javax.jms.Message;

Modified: incubator/qpid/branches/M2.1/java/integrationtests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/integrationtests/pom.xml?rev=629518&r1=629517&r2=629518&view=diff
==============================================================================
--- incubator/qpid/branches/M2.1/java/integrationtests/pom.xml (original)
+++ incubator/qpid/branches/M2.1/java/integrationtests/pom.xml Wed Feb 20 08:04:25 2008
@@ -1,146 +1,146 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements. See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership. The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License. You may obtain a copy of the License at
-    
-    http://www.apache.org/licenses/LICENSE-2.0
-    
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-    KIND, either express or implied. See the License for the
-    specific language governing permissions and limitations
-    under the License.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.apache.qpid</groupId>
-    <artifactId>qpid-integrationtests</artifactId>
-    <packaging>jar</packaging>
-    <version>1.0-incubating-M2.1-SNAPSHOT</version>
-    <name>Qpid Integration Tests</name>
-
-    <parent>
-        <groupId>org.apache.qpid</groupId>
-        <artifactId>qpid</artifactId>
-        <version>1.0-incubating-M2.1-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <properties>
-        <topDirectoryLocation>..</topDirectoryLocation>
-    </properties>
-
-    <dependencies>
-
-        <dependency>
-            <groupId>org.apache.qpid</groupId>
-            <artifactId>qpid-client</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.qpid</groupId>
-            <artifactId>qpid-systests</artifactId>
-        </dependency>
-
-        <dependency>  
-            <groupId>org.slf4j</groupId> 
-            <artifactId>slf4j-log4j12</artifactId>  
-            <version>1.4.0</version>
-        </dependency>
-
-        <dependency>
-            <groupId>uk.co.thebadgerset</groupId>
-            <artifactId>junit-toolkit</artifactId>
-            <scope>compile</scope>
-        </dependency>
-
-        <!-- JUnit is a compile and runtime dependancy for these tests, not just a test time dependency. -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>compile</scope>
-        </dependency>
-
-        <!-- These need to be included at compile time only, for the retrotranslator verification to find them. -->
-        <dependency>
-            <groupId>net.sf.retrotranslator</groupId>
-            <artifactId>retrotranslator-runtime</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-            </plugin>
-
-            <!-- Backports the module to Java 1.4. This is done during the packaging phase as a transformation of the Jar. -->
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>retrotranslator-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>retro-intergration-tests</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>translate-project</goal>
-                        </goals>
-                        <configuration>
-                            <!--<destdir>${project.build.directory}/retro-classes</destdir>-->
-                            <destjar>${project.build.directory}/${project.build.finalName}-java14.jar</destjar>
-                            <verify>${retrotranslator.verify}</verify>
-                            <verifyClasspath>
-                                <element>${retrotranslator.1.4-rt-path}</element>
-                                <element>${retrotranslator.1.4-jce-path}</element>
-                                <element>${retrotranslator.1.4-jsse-path}</element>
-                                <element>${retrotranslator.1.4-sasl-path}</element>
-                            </verifyClasspath>
-                            <failonwarning>false</failonwarning>
-                            <classifier>java14</classifier>
-                            <attach>true</attach>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.2-SNAPSHOT</version>
-                <configuration>
-                    <descriptors>
-                        <descriptor>jar-with-dependencies.xml</descriptor>
-                    </descriptors>
-                    <outputDirectory>target</outputDirectory>
-                    <workDirectory>target/assembly/work</workDirectory>
-                </configuration>
-            </plugin>
-            
-        </plugins>
-
-        <resources>
-            <!-- Ensure all resources defined in the resources directory are copied into the build jar. -->
-            <resource>
-                <targetPath></targetPath>
-                <filtering>false</filtering>
-                <directory>src/resources</directory>
-                <includes>
-                    <include>**/*</include>
-                </includes>
-            </resource>
-        </resources>
-
-    </build>
-
-</project>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License. You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied. See the License for the
+    specific language governing permissions and limitations
+    under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.qpid</groupId>
+    <artifactId>qpid-integrationtests</artifactId>
+    <packaging>jar</packaging>
+    <version>1.0-incubating-M2.1-SNAPSHOT</version>
+    <name>Qpid Integration Tests</name>
+
+    <parent>
+        <groupId>org.apache.qpid</groupId>
+        <artifactId>qpid</artifactId>
+        <version>1.0-incubating-M2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <properties>
+        <topDirectoryLocation>..</topDirectoryLocation>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.qpid</groupId>
+            <artifactId>qpid-client</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.qpid</groupId>
+            <artifactId>qpid-systests</artifactId>
+        </dependency>
+
+        <dependency>  
+            <groupId>org.slf4j</groupId> 
+            <artifactId>slf4j-log4j12</artifactId>  
+            <version>1.4.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.qpid</groupId>
+            <artifactId>junit-toolkit</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <!-- JUnit is a compile and runtime dependancy for these tests, not just a test time dependency. -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <!-- These need to be included at compile time only, for the retrotranslator verification to find them. -->
+        <dependency>
+            <groupId>net.sf.retrotranslator</groupId>
+            <artifactId>retrotranslator-runtime</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+            </plugin>
+
+            <!-- Backports the module to Java 1.4. This is done during the packaging phase as a transformation of the Jar. -->
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>retrotranslator-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>retro-intergration-tests</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>translate-project</goal>
+                        </goals>
+                        <configuration>
+                            <!--<destdir>${project.build.directory}/retro-classes</destdir>-->
+                            <destjar>${project.build.directory}/${project.build.finalName}-java14.jar</destjar>
+                            <verify>${retrotranslator.verify}</verify>
+                            <verifyClasspath>
+                                <element>${retrotranslator.1.4-rt-path}</element>
+                                <element>${retrotranslator.1.4-jce-path}</element>
+                                <element>${retrotranslator.1.4-jsse-path}</element>
+                                <element>${retrotranslator.1.4-sasl-path}</element>
+                            </verifyClasspath>
+                            <failonwarning>false</failonwarning>
+                            <classifier>java14</classifier>
+                            <attach>true</attach>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.2-SNAPSHOT</version>
+                <configuration>
+                    <descriptors>
+                        <descriptor>jar-with-dependencies.xml</descriptor>
+                    </descriptors>
+                    <outputDirectory>target</outputDirectory>
+                    <workDirectory>target/assembly/work</workDirectory>
+                </configuration>
+            </plugin>
+            
+        </plugins>
+
+        <resources>
+            <!-- Ensure all resources defined in the resources directory are copied into the build jar. -->
+            <resource>
+                <targetPath></targetPath>
+                <filtering>false</filtering>
+                <directory>src/resources</directory>
+                <includes>
+                    <include>**/*</include>
+                </includes>
+            </resource>
+        </resources>
+
+    </build>
+
+</project>

Added: incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/pom.xml?rev=629518&view=auto
==============================================================================
--- incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/pom.xml (added)
+++ incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/pom.xml Wed Feb 20 08:04:25 2008
@@ -0,0 +1,61 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.qpid</groupId>
+    <artifactId>junit-toolkit-maven-plugin</artifactId>
+    <name>junit-toolkit-maven-plugin</name>
+    <version>1.0-incubating-M2.1-SNAPSHOT</version>
+
+    <packaging>maven-plugin</packaging>
+
+    <parent>
+        <groupId>org.apache.qpid</groupId>
+        <artifactId>qpid</artifactId>
+        <version>1.0-incubating-M2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <properties>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+
+            <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>3.8.1</version>
+            </dependency>
+
+            <dependency>
+                <groupId>log4j</groupId>
+                <artifactId>log4j</artifactId>
+                <version>1.2.12</version>
+            </dependency>
+        
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.qpid</groupId>
+            <artifactId>junit-toolkit</artifactId>
+            <version>1.0-incubating-M2.1-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+            <version>2.0.4</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <sourceDirectory>src/main</sourceDirectory>
+        <testSourceDirectory>src/unittests</testSourceDirectory>
+    </build>
+
+</project>
\ No newline at end of file

Added: incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/IsolatedClassLoader.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/IsolatedClassLoader.java?rev=629518&view=auto
==============================================================================
--- incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/IsolatedClassLoader.java (added)
+++ incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/IsolatedClassLoader.java Wed Feb 20 08:04:25 2008
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2007 Rupert Smith.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.qpid.junit.maven;
+
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * <p><table id="crc"><caption>CRC Card</caption>
+ * <tr><th> Responsibilities <th> Collaborations
+ * </table>
+ *
+ * @author Rupert Smith
+ *
+ * @noinspection CustomClassloader
+ */
+public class IsolatedClassLoader extends URLClassLoader
+{
+
+    private static final URL[] EMPTY_URL_ARRAY = new URL[0];
+    private ClassLoader parent = ClassLoader.getSystemClassLoader();
+
+    private Set urls = new HashSet();
+
+    private boolean childDelegation = true;
+
+    public IsolatedClassLoader()
+    {
+        super(EMPTY_URL_ARRAY, null);
+    }
+
+    public IsolatedClassLoader(ClassLoader parent, boolean childDelegation)
+    {
+        super(EMPTY_URL_ARRAY, parent);
+
+        this.childDelegation = childDelegation;
+    }
+
+    public IsolatedClassLoader(ClassLoader parent)
+    {
+        super(EMPTY_URL_ARRAY, parent);
+    }
+
+    public void addURL(URL url)
+    {
+        // avoid duplicates
+        if (!urls.contains(url))
+        {
+            super.addURL(url);
+            urls.add(url);
+        }
+    }
+
+    public synchronized Class loadClass(String name) throws ClassNotFoundException
+    {
+        Class c;
+
+        if (childDelegation)
+        {
+            c = findLoadedClass(name);
+
+            ClassNotFoundException ex = null;
+
+            if (c == null)
+            {
+                try
+                {
+                    c = findClass(name);
+                }
+                catch (ClassNotFoundException e)
+                {
+                    ex = e;
+
+                    if (parent != null)
+                    {
+                        c = parent.loadClass(name);
+                    }
+                }
+            }
+
+            if (c == null)
+            {
+                throw ex;
+            }
+        }
+        else
+        {
+            c = super.loadClass(name);
+        }
+
+        return c;
+    }
+}

Added: incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/TKTestRunnerMojo.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/TKTestRunnerMojo.java?rev=629518&view=auto
==============================================================================
--- incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/TKTestRunnerMojo.java (added)
+++ incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/TKTestRunnerMojo.java Wed Feb 20 08:04:25 2008
@@ -0,0 +1,274 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.junit.maven;
+
+import org.apache.maven.plugin.AbstractMojo;
+
+import java.io.File;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.*;
+
+/**
+ * TKTestRunnerMojo is a JUnit test runner plugin for Maven 2. It is intended to be compatible with the surefire
+ * plugin (though not all features of that are yet implemented), with some extended capabilities.
+ *
+ * <p/>This plugin adds the ability to use different JUnit test runners, and to pass arbitrary options to them.
+ *
+ * <p><table id="crc"><caption>CRC Card</caption>
+ * <tr><th> Responsibilities <th> Collaborations
+ * </table>
+ *
+ * @author Rupert Smith
+ *
+ * @goal tktest
+ * @phase test
+ * @requiresDependencyResolution test
+ */
+public class TKTestRunnerMojo extends AbstractMojo
+{
+    private static final BitSet UNRESERVED = new BitSet(256);
+
+    /**
+     * Set this to 'true' to bypass unit tests entirely. Its use is NOT RECOMMENDED, but quite convenient on occasion.
+     *
+     * @parameter expression="${maven.test.skip}"
+     */
+    private boolean skip;
+
+    /**
+     * The TKTest runner command lines. There are passed directly to the TKTestRunner main method.
+     *
+     * @parameter
+     */
+    private Map<String, String> commands = new LinkedHashMap<String, String>();
+
+    /**
+     * The base directory of the project being tested. This can be obtained in your unit test by
+     * System.getProperty("basedir").
+     *
+     * @parameter expression="${basedir}"
+     * @required
+     */
+    private File basedir;
+
+    /**
+     * The directory containing generated classes of the project being tested.
+     *
+     * @parameter expression="${project.build.outputDirectory}"
+     * @required
+     */
+    private File classesDirectory;
+
+    /**
+     * The directory containing generated test classes of the project being tested.
+     *
+     * @parameter expression="${project.build.testOutputDirectory}"
+     * @required
+     */
+    private File testClassesDirectory;
+
+    /**
+     * The classpath elements of the project being tested.
+     *
+     * @parameter expression="${project.testClasspathElements}"
+     * @required
+     * @readonly
+     */
+    private List classpathElements;
+
+    /**
+     * List of System properties to pass to the tests.
+     *
+     * @parameter
+     */
+    private Properties systemProperties;
+
+    /**
+     * Map of of plugin artifacts.
+     *
+     * @parameter expression="${plugin.artifactMap}"
+     * @required
+     * @readonly
+     */
+    private Map pluginArtifactMap;
+
+    /**
+     * Map of of project artifacts.
+     *
+     * @parameter expression="${project.artifactMap}"
+     * @required
+     * @readonly
+     */
+    private Map projectArtifactMap;
+
+    /**
+     * Option to specify the forking mode. Can be "never" (default), "once" or "always".
+     * "none" and "pertest" are also accepted for backwards compatibility.
+     *
+     * @parameter expression="${forkMode}" default-value="once"
+     */
+    private String forkMode;
+
+    /**
+     * Option to specify the jvm (or path to the java executable) to use with
+     * the forking options. For the default we will assume that java is in the path.
+     *
+     * @parameter expression="${jvm}"
+     * default-value="java"
+     */
+    private String jvm;
+
+    /**
+     * The test runner to use.
+     *
+     * @parameter
+     */
+    private String testrunner;
+
+    /**
+     * The additional properties to append to the test runner invocation command line.
+     *
+     * @parameter
+     */
+    private Properties testrunnerproperties;
+
+    /**
+     * The options to pass to all test runner invocation command lines.
+     *
+     * @parameter
+     */
+    private String[] testrunneroptions;
+
+    /**
+     * Implementation of the tktest goal.
+     */
+    public void execute()
+    {
+        // Skip these tests if test skipping is turned on.
+        if (skip)
+        {
+            getLog().info("Skipping Tests.");
+
+            return;
+        }
+
+        // Log out the classpath if debugging is on.
+        if (getLog().isDebugEnabled())
+        {
+            getLog().info("Test Classpath :");
+
+            for (Object classpathElement1 : classpathElements)
+            {
+                String classpathElement = (String) classpathElement1;
+                getLog().info("  " + classpathElement);
+            }
+        }
+
+        try
+        {
+            // Create a class loader to load the test runner with. This also gets set as the context loader for this
+            // thread, so that all subsequent class loading activity by the test runner or the test code, has the
+            // test classes available to it. The system loader is set up for the maven build, which is why a seperate
+            // loader needs to be created; in order to inject the test dependencies into it.
+            ClassLoader runnerClassLoader = createClassLoader(classpathElements, ClassLoader.getSystemClassLoader(), true);
+            Thread.currentThread().setContextClassLoader(runnerClassLoader);
+
+            // Load the test runner implementation that will be used to run the tests.
+            if ((testrunner == null) || "".equals(testrunner))
+            {
+                testrunner = "org.apache.qpid.junit.extensions.TKTestRunner";
+            }
+
+            Class testRunnerClass = Class.forName(testrunner, false, runnerClassLoader);
+            Method run = testRunnerClass.getMethod("main", String[].class);
+
+            // Concatenate all of the options to pass on the command line to the test runner.
+            String preOptions = "";
+
+            for (String option : testrunneroptions)
+            {
+                preOptions += option + " ";
+            }
+
+            // Concatenate all of the additional properties as name=value pairs on the command line.
+            String nvPairs = "";
+
+            if (testrunnerproperties != null)
+            {
+                for (Object objKey : testrunnerproperties.keySet())
+                {
+                    String key = (String) objKey;
+                    String value = testrunnerproperties.getProperty(key);
+
+                    nvPairs = key + "=" + value + " ";
+                }
+            }
+
+            // Pass each of the test runner command lines in turn to the toolkit test runner.
+            // The command line is made up of the options, the command specific command line, then the trailing
+            // name=value pairs.
+            for (String testName : commands.keySet())
+            {
+                String commandLine = preOptions + " " + commands.get(testName) + " " + nvPairs;
+                getLog().info("commandLine = " + commandLine);
+
+                // Tokenize the command line on white space, into an array of string components.
+                String[] tokenizedCommandLine = commandLine.split("\\s+");
+
+                // Run the tests.
+                run.invoke(testRunnerClass, new Object[] { tokenizedCommandLine });
+            }
+        }
+        catch (Exception e)
+        {
+            getLog().error("There was an exception: " + e.getMessage(), e);
+        }
+    }
+
+    private static ClassLoader createClassLoader(List classPathUrls, ClassLoader parent, boolean childDelegation)
+        throws MalformedURLException
+    {
+        List urls = new ArrayList();
+
+        for (Iterator i = classPathUrls.iterator(); i.hasNext();)
+        {
+            String url = (String) i.next();
+
+            if (url != null)
+            {
+                File f = new File(url);
+                urls.add(f.toURL());
+            }
+        }
+
+        IsolatedClassLoader classLoader = new IsolatedClassLoader(parent, childDelegation);
+
+        for (Iterator iter = urls.iterator(); iter.hasNext();)
+        {
+            URL url = (URL) iter.next();
+            classLoader.addURL(url);
+        }
+
+        return classLoader;
+    }
+}

Added: incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/TKTestScriptGenMojo.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/TKTestScriptGenMojo.java?rev=629518&view=auto
==============================================================================
--- incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/TKTestScriptGenMojo.java (added)
+++ incubator/qpid/branches/M2.1/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/TKTestScriptGenMojo.java Wed Feb 20 08:04:25 2008
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2007 Rupert Smith.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.qpid.junit.maven;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Properties;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+/**
+ * <p><table id="crc"><caption>CRC Card</caption>
+ * <tr><th> Responsibilities <th> Collaborations
+ * </table>
+ *
+ * @author Rupert Smith
+ * @goal tkscriptgen
+ * @phase test
+ * @execute phase="test"
+ * @requiresDependencyResolution test
+ */
+public class TKTestScriptGenMojo extends AbstractMojo
+{
+    private static final String _scriptLanguage = "#!/bin/bash\n\n";
+
+    private static final String _javaOptArgParser =
+        "# Parse arguements taking all - prefixed args as JAVA_OPTS\n" + "for arg in \"$@\"; do\n"
+        + "    if [[ $arg == -java:* ]]; then\n" + "        JAVA_OPTS=\"${JAVA_OPTS}-`echo $arg|cut -d ':' -f 2`  \"\n"
+        + "    else\n" + "        ARGS=\"${ARGS}$arg \"\n" + "    fi\n" + "done\n\n";
+
+    /**
+     * Where to write out the scripts.
+     *
+     * @parameter
+     */
+    private String scriptOutDirectory;
+
+    /**
+     * The all-in-one test jar location.
+     *
+     * @parameter
+     */
+    private String testJar;
+
+    /**
+     * The system properties to pass to java runtime.
+     *
+     * @parameter
+     */
+    private Properties systemproperties;
+
+    /**
+     * The TKTest runner command lines. There are passed directly to the TKTestRunner main method.
+     *
+     * @parameter
+     */
+    private Map<String, String> commands = new LinkedHashMap<String, String>();
+
+    /**
+     * Implementation of the tkscriptgen goal.
+     *
+     * @throws MojoExecutionException
+     */
+    public void execute() throws MojoExecutionException
+    {
+        // Turn each of the test runner command lines into a script.
+        for (String testName : commands.keySet())
+        {
+            String testOptions = commands.get(testName);
+            String commandLine = "java ";
+
+            String logdir = null;
+
+            for (Object key : systemproperties.keySet())
+            {
+                String keyString = (String) key;
+                String value = systemproperties.getProperty(keyString);
+
+                if (keyString.equals("logdir"))
+                {
+                    logdir = value;
+                }
+                else
+                {
+                    if (keyString.startsWith("-X"))
+                    {
+                        commandLine += keyString + value + " ";
+                    }
+                    else
+                    {
+                        commandLine += "-D" + keyString + "=" + value + " ";
+                    }
+                }
+            }
+
+            commandLine +=
+                "${JAVA_OPTS} -cp " + testJar + " org.apache.qpid.junit.extensions.TKTestRunner " + testOptions
+                + " ${ARGS}";
+
+            getLog().info("Generating Script for test: " + testName);
+            getLog().debug(commandLine);
+
+            String fileName = scriptOutDirectory + "/" + testName + ".sh";
+
+            try
+            {
+                File scriptFile = new File(fileName);
+                Writer scriptWriter = new FileWriter(scriptFile);
+                scriptWriter.write(_scriptLanguage);
+                scriptWriter.write(_javaOptArgParser);
+                if (logdir != null)
+                {
+                    scriptWriter.write("mkdir -p " + logdir + "\n");
+                }
+
+                scriptWriter.write(commandLine);
+                scriptWriter.flush();
+                scriptWriter.close();
+            }
+            catch (IOException e)
+            {
+                getLog().error("Failed to write: " + fileName);
+            }
+        }
+    }
+}

Added: incubator/qpid/branches/M2.1/java/junit-toolkit/pom.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/junit-toolkit/pom.xml?rev=629518&view=auto
==============================================================================
--- incubator/qpid/branches/M2.1/java/junit-toolkit/pom.xml (added)
+++ incubator/qpid/branches/M2.1/java/junit-toolkit/pom.xml Wed Feb 20 08:04:25 2008
@@ -0,0 +1,57 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.qpid</groupId>
+    <artifactId>junit-toolkit</artifactId>
+    <name>junit-toolkit</name>
+    <version>1.0-incubating-M2.1-SNAPSHOT</version>
+
+    <packaging>jar</packaging>
+
+    <parent>
+        <groupId>org.apache.qpid</groupId>
+        <artifactId>qpid</artifactId>
+        <version>1.0-incubating-M2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <properties>
+        <topDirectoryLocation>..</topDirectoryLocation>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+
+            <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>3.8.1</version>
+            </dependency>
+
+            <dependency>
+                <groupId>log4j</groupId>
+                <artifactId>log4j</artifactId>
+                <version>1.2.12</version>
+            </dependency>
+        
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <sourceDirectory>src/main</sourceDirectory>
+        <testSourceDirectory>src/unittests</testSourceDirectory>
+    </build>
+
+</project>
\ No newline at end of file

Added: incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/DefaultThreadFactory.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/DefaultThreadFactory.java?rev=629518&view=auto
==============================================================================
--- incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/DefaultThreadFactory.java (added)
+++ incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/DefaultThreadFactory.java Wed Feb 20 08:04:25 2008
@@ -0,0 +1,48 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.junit.concurrency;
+
+import java.util.concurrent.ThreadFactory;
+
+/**
+ * Implements a default thread factory.
+ *
+ * <p/><table id="crc"><caption>CRC Card</caption>
+ * <tr><th> Responsibilities <th> Collaborations
+ * <tr><td> Create default threads with no specialization.
+ * </table>
+ *
+ * @author Rupert Smith
+ */
+public class DefaultThreadFactory implements ThreadFactory
+{
+    /**
+     * Constructs a new <tt>Thread</tt>.
+     *
+     * @param r A runnable to be executed by new thread instance.
+     *
+     * @return The constructed thread.
+     */
+    public Thread newThread(Runnable r)
+    {
+        return new Thread(r);
+    }
+}

Added: incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/PossibleDeadlockException.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/PossibleDeadlockException.java?rev=629518&view=auto
==============================================================================
--- incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/PossibleDeadlockException.java (added)
+++ incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/PossibleDeadlockException.java Wed Feb 20 08:04:25 2008
@@ -0,0 +1,46 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.junit.concurrency;
+
+/**
+ * PossibleDeadlockException is used to signal that two test threads being executed by a {@link ThreadTestCoordinator}
+ * may be in a state of deadlock because they are mutually blocking each other or one is waiting on the other and the
+ * other has been blocked elsewhere for longer than a specified timeout.
+ *
+ * <p/><table id="crc"><caption>CRC Card</caption>
+ * <tr><th> Responsibilities <th> Collaborations
+ * <tr><td> Signal a possible state of deadlock between coordinated test threads.
+ * </table>
+ *
+ * @author Rupert Smith
+ */
+public class PossibleDeadlockException extends RuntimeException
+{
+    /**
+     * Create a new possible deadlock execption.
+     *
+     * @param message The exception message.
+     */
+    public PossibleDeadlockException(String message)
+    {
+        super(message);
+    }
+}

Added: incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/TestRunnable.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/TestRunnable.java?rev=629518&view=auto
==============================================================================
--- incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/TestRunnable.java (added)
+++ incubator/qpid/branches/M2.1/java/junit-toolkit/src/main/org/apache/qpid/junit/concurrency/TestRunnable.java Wed Feb 20 08:04:25 2008
@@ -0,0 +1,239 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.junit.concurrency;
+
+/**
+ * TestRunnable is an extension of java.util.Runnable that adds some features to make it easier to coordinate the
+ * activities of threads in such a way as to expose bugs in multi threaded code.
+ *
+ * <p/>Sometimes several threads will run in a particular order so that a bug is not revealed. Other times the ordering
+ * of the threads will expose a bug. Such bugs can be hard to replicate as the exact execution ordering of threads is not
+ * usually controlled. This class adds some methods that allow threads to synchronize other threads, either allowing them
+ * to run, or waiting for them to allow this thread to run. It also provides convenience methods to gather error messages
+ * and exceptions from threads, which will often be reported in unit testing code.
+ *
+ * <p/>Coordination between threads is handled by the {@link ThreadTestCoordinator}. It is called through the convenience
+ * methods {@link #allow} and {@link #waitFor}. Threads to be coordinated must be set up with the coordinator and assigned
+ * integer ids. It is then possible to call the coordinator with an array of thread ids requesting that those threads
+ * be allowed to continue, or to wait until one of them allows this thread to continue. The otherwise non-deterministic
+ * execution order of threads can be controlled into a carefully determined sequence using these methods in order
+ * to reproduce race conditions, dead locks, live locks, dirty reads, phantom reads, non repeatable reads and so on.
+ *
+ * <p/>When waiting for another thread to give a signal to continue it is sometimes the case that the other thread has
+ * become blocked by the code under test. For example in testing for a dirty read (for example in database code),
+ * thread 1 lets thread 2 perform a write but not commit it, then thread 2 lets thread 1 run and attempt to perform a
+ * dirty read on its uncommitted write. Transaction synchronization code being tested against the possibility of a dirty
+ * write may make use of snapshots in which case both threads should be able to read and write without blocking. It may
+ * make use of explicit keys in which case thread 2 may become blocked on its write attempt because thread 1 holds a
+ * read lock and it must wait until thread 1 completes its transaction before it can acquire this lock. The
+ * {@link #waitFor} method accepts a boolean parameter to indicate that threads being blocked (other than on the
+ * coordinator) can be interpreted the same as if the thread explicitly allows the thread calling waitFor to continue.
+ * Using this technique a dirty read test could be written that works against either the snapshot or the locking
+ * implementation, allowing both approaches to pass the test yet arranging for multiple threads to run against the
+ * implementation in such a way that a potential dirty read bug is exposed.
+ *
+ * <p/><table id="crc"><caption>CRC Card</caption>
+ * <tr><th> Responsibilities <th> Collaborations
+ * <tr><td> Wait for another thread to allow this one to continue.
+ * <tr><td> Allow another thread to continue.
+ * <tr><td> Accumulate error messages.
+ * <tr><td> Record exceptions from thread run.
+ * <tr><td> Maintain link to thread coordinator.
+ * <tr><td> Explicitly mark a thread with an integer id.
+ * <tr><td> Maintian a flag to indicate whether or not this thread is waiting on the coordinator.
+ * </table>
+ *
+ * @todo The allow then waitFor operations are very often used as a pair. So create a method allowAndWait that combines
+ *       them into a single method call.
+ *
+ * @author Rupert Smith
+ */
+public abstract class TestRunnable implements Runnable
+{
+    /** Holds a reference to the thread coordinator. */
+    private ThreadTestCoordinator coordinator;
+
+    /** Holds the explicit integer id of this thread. */
+    private int id;
+
+    /** Used to indicate that this thread is waiting on the coordinator and not elsewhere. */
+    private boolean waitingOnCoordinator = false;
+
+    /** Used to accumulate error messsages. */
+    private String errorMessage = "";
+
+    /** Holds the Java thread object that this is running under. */
+    private Thread thisThread;
+
+    /** Used to hold any exceptions resulting from the run method. */
+    private Exception runException = null;
+
+    /**
+     * Implementations override this to perform coordinated thread sequencing.
+     *
+     * @throws Exception Any exception raised by the implementation will be caught by the default {@link #run()}
+     *                   implementation for later querying by the {@link #getException()} method.
+     */
+    public abstract void runWithExceptions() throws Exception;
+
+    /**
+     * Provides a default implementation of the run method that allows exceptions to be thrown and keeps a record
+     * of those exceptions. Defers to the {@link #runWithExceptions()} method to provide the thread body implementation
+     * and catches any exceptions thrown by it.
+     */
+    public void run()
+    {
+        try
+        {
+            runWithExceptions();
+        }
+        catch (Exception e)
+        {
+            this.runException = e;
+        }
+    }
+
+    /**
+     * Attempt to consume an allow event from one of the specified threads and blocks until such an event occurrs.
+     *
+     * @param threads          The set of threads that can allow this one to continue.
+     * @param otherWaitIsAllow If set to <tt>true</tt> if the threads being waited on are blocked other than on
+     *                         the coordinator itself then this is to be interpreted as allowing this thread to
+     *                         continue.
+     *
+     * @return If the <tt>otherWaitIsAllow</tt> flag is set, then <tt>true</tt> is returned when the thread being waited on is found
+     *         to be blocked outside of the thread test coordinator. <tt>false</tt> under all other conditions.
+     */
+    protected boolean waitFor(int[] threads, boolean otherWaitIsAllow)
+    {
+        return coordinator.consumeAllowEvent(threads, otherWaitIsAllow, id, this);
+    }
+
+    /**
+     * Produces allow events on each of the specified threads.
+     *
+     * @param threads The set of threads that are to be allowed to continue.
+     */
+    protected void allow(int[] threads)
+    {
+        coordinator.produceAllowEvents(threads, id, this);
+    }
+
+    /**
+     * Keeps the error message for later reporting by the coordinator.
+     *
+     * @param message The error message to keep.
+     */
+    protected void addErrorMessage(String message)
+    {
+        errorMessage += message;
+    }
+
+    /**
+     * Sets the coordinator for this thread.
+     *
+     * @param coordinator The coordinator for this thread.
+     */
+    void setCoordinator(ThreadTestCoordinator coordinator)
+    {
+        this.coordinator = coordinator;
+    }
+
+    /**
+     * Reports whether or not this thread is waiting on the coordinator.
+     *
+     * @return <tt>If this thread is waiting on the coordinator.
+     */
+    boolean isWaitingOnCoordinator()
+    {
+        return waitingOnCoordinator;
+    }
+
+    /**
+     * Sets the value of the waiting on coordinator flag.
+     *
+     * @param waiting The value of the waiting on coordinator flag.
+     */
+    void setWaitingOnCoordinator(boolean waiting)
+    {
+        waitingOnCoordinator = waiting;
+    }
+
+    /**
+     * Sets up the explicit int id for this thread.
+     *
+     * @param id The integer id.
+     */
+    void setId(int id)
+    {
+        this.id = id;
+    }
+
+    /**
+     * Reports any accumulated error messages.
+     *
+     * @return Any accumulated error messages.
+     */
+    String getErrorMessage()
+    {
+        return errorMessage;
+    }
+
+    /**
+     * Reports any exception thrown by the {@link #runWithExceptions} method.
+     *
+     * @return Any exception thrown by the {@link #runWithExceptions} method.
+     */
+    Exception getException()
+    {
+        return runException;
+    }
+
+    /**
+     * Sets the Java thread under which this runs.
+     *
+     * @param thread The Java thread under which this runs.
+     */
+    void setThread(Thread thread)
+    {
+        thisThread = thread;
+    }
+
+    /**
+     * Gets the Java thread under which this runs.
+     *
+     * @return The Java thread under which this runs.
+     */
+    Thread getThread()
+    {
+        return thisThread;
+    }
+
+    /**
+     * Provides a string summary of this test threads status.
+     *
+     * @return Summarizes this threads status.
+     */
+    public String toString()
+    {
+        return "id = " + id + ", waitingOnCoordinator = " + waitingOnCoordinator;
+    }
+}