From 434b563eae0b60920cbf89fa146117cc80df7c63 Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Mon, 19 Dec 2005 20:44:36 +0000 Subject: [PATCH] Moved the aio adapter to a sub module git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@357789 13f79535-47bb-0310-9956-ffa450edef68 --- .../packet/async/aio/AIOAsyncChannel.java | 0 .../async/aio/AIOAsyncChannelFactory.java | 0 .../async/aio/AIOSyncChannelServer.java | 0 .../packet/async/aio/AIOAsyncChannelTest.java | 0 activeio/activeio-core/maven.xml | 32 ++++- activeio/activeio-core/pom.xml | 120 +++--------------- activeio/activeio-core/project.xml | 6 +- .../META-INF/org.activeio.ChannelFactory/aio | 1 - .../test/org/activeio/ChannelFactoryTest.java | 20 --- .../OnePortAsyncChannelServerTest.java | 36 +++--- 10 files changed, 69 insertions(+), 146 deletions(-) rename activeio/{activeio-core/src => activeio-aio/src/main}/java/org/activeio/packet/async/aio/AIOAsyncChannel.java (100%) rename activeio/{activeio-core/src => activeio-aio/src/main}/java/org/activeio/packet/async/aio/AIOAsyncChannelFactory.java (100%) rename activeio/{activeio-core/src => activeio-aio/src/main}/java/org/activeio/packet/async/aio/AIOSyncChannelServer.java (100%) rename activeio/{activeio-core/src/test => activeio-aio/src/test/java}/org/activeio/packet/async/aio/AIOAsyncChannelTest.java (100%) delete mode 100644 activeio/activeio-core/src/resources/META-INF/org.activeio.ChannelFactory/aio diff --git a/activeio/activeio-core/src/java/org/activeio/packet/async/aio/AIOAsyncChannel.java b/activeio/activeio-aio/src/main/java/org/activeio/packet/async/aio/AIOAsyncChannel.java similarity index 100% rename from activeio/activeio-core/src/java/org/activeio/packet/async/aio/AIOAsyncChannel.java rename to activeio/activeio-aio/src/main/java/org/activeio/packet/async/aio/AIOAsyncChannel.java diff --git a/activeio/activeio-core/src/java/org/activeio/packet/async/aio/AIOAsyncChannelFactory.java b/activeio/activeio-aio/src/main/java/org/activeio/packet/async/aio/AIOAsyncChannelFactory.java similarity index 100% rename from activeio/activeio-core/src/java/org/activeio/packet/async/aio/AIOAsyncChannelFactory.java rename to activeio/activeio-aio/src/main/java/org/activeio/packet/async/aio/AIOAsyncChannelFactory.java diff --git a/activeio/activeio-core/src/java/org/activeio/packet/async/aio/AIOSyncChannelServer.java b/activeio/activeio-aio/src/main/java/org/activeio/packet/async/aio/AIOSyncChannelServer.java similarity index 100% rename from activeio/activeio-core/src/java/org/activeio/packet/async/aio/AIOSyncChannelServer.java rename to activeio/activeio-aio/src/main/java/org/activeio/packet/async/aio/AIOSyncChannelServer.java diff --git a/activeio/activeio-core/src/test/org/activeio/packet/async/aio/AIOAsyncChannelTest.java b/activeio/activeio-aio/src/test/java/org/activeio/packet/async/aio/AIOAsyncChannelTest.java similarity index 100% rename from activeio/activeio-core/src/test/org/activeio/packet/async/aio/AIOAsyncChannelTest.java rename to activeio/activeio-aio/src/test/java/org/activeio/packet/async/aio/AIOAsyncChannelTest.java diff --git a/activeio/activeio-core/maven.xml b/activeio/activeio-core/maven.xml index 076110e32e..e8f1eba7c2 100644 --- a/activeio/activeio-core/maven.xml +++ b/activeio/activeio-core/maven.xml @@ -1,5 +1,7 @@ - + + @@ -37,6 +39,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/activeio/activeio-core/pom.xml b/activeio/activeio-core/pom.xml index 1f14beff32..2b7e86f78d 100644 --- a/activeio/activeio-core/pom.xml +++ b/activeio/activeio-core/pom.xml @@ -1,97 +1,20 @@ + 4.0.0 - activeio - activeio - ActiveIO - 2.1 + + + + activemq + activemq + 4.0-SNAPSHOT + + + activeio-core + ActiveIO :: Core + 3.0-SNAPSHOT http://activeio.org/ - - - activeio dev - dev-subscribe@activeio.codehaus.org - dev-unsubscribe@activeio.codehaus.org - - - activeio users - user-subscribe@activeio.codehaus.org - user-unsubscribe@activeio.codehaus.org - - - activeio svn messages - scm-subscribe@activeio.codehaus.org - scm-unsubscribe@activeio.codehaus.org - - - - - chirino - Hiram Chirino - hiram@hiramchirino.com - - - Founder - - - - adc - Alan D. Cabrera - adc@toolazydogs.com - - - Founder - - - - dblevins - David Blevins - dblevins@gluecode.com - - - Founder - - - - - scm:svn:hvttps://svn.codehaus.org/activeio/trunk/activeio - scm:svn:svn+ssh://svn.activeio.org/home/projects/activeio/scm/trunk/activeio - http://svn.activeio.org/viewcvs.cgi/activeio/ - - - The AsctiveIO Project - http://activeio.org - - - src/java - src/test - - - src/resources - - **/* - - - - - - src/test - - **/*.properties - **/*.xml - - - - - - surefire - - - **/*Test.java - - - - - + backport-util-concurrent @@ -113,16 +36,19 @@ jxta 2.0 + jetty org.mortbay.jetty 5.1.2-SNAPSHOT + junit junit @@ -199,16 +126,5 @@ 3.0.1 - - - default - Default Repository - dist.codehaus.org//dist - - - default - Default Site - scp://www.activeio.org//home/projects/activeio/public_html/maven - - + diff --git a/activeio/activeio-core/project.xml b/activeio/activeio-core/project.xml index 457de01b77..0075fb8f99 100644 --- a/activeio/activeio-core/project.xml +++ b/activeio/activeio-core/project.xml @@ -18,11 +18,11 @@ 3 - ${basedir}/../etc/project.xml + ${basedir}/../../etc/project.xml 3.0-SNAPSHOT - ActiveIO - activeio + ActiveIO :: Core + activeio-core org.activeio diff --git a/activeio/activeio-core/src/resources/META-INF/org.activeio.ChannelFactory/aio b/activeio/activeio-core/src/resources/META-INF/org.activeio.ChannelFactory/aio deleted file mode 100644 index 07a411fcd8..0000000000 --- a/activeio/activeio-core/src/resources/META-INF/org.activeio.ChannelFactory/aio +++ /dev/null @@ -1 +0,0 @@ -AsyncChannelFactory.class=org.activeio.packet.async.aio.AIOAsyncChannelFactory diff --git a/activeio/activeio-core/src/test/org/activeio/ChannelFactoryTest.java b/activeio/activeio-core/src/test/org/activeio/ChannelFactoryTest.java index a9036825f3..06e6312393 100644 --- a/activeio/activeio-core/src/test/org/activeio/ChannelFactoryTest.java +++ b/activeio/activeio-core/src/test/org/activeio/ChannelFactoryTest.java @@ -27,8 +27,6 @@ import org.activeio.adapter.AsyncToSyncChannel; import org.activeio.adapter.SyncToAsyncChannel; import org.activeio.packet.async.AsyncChannel; import org.activeio.packet.async.AsyncChannelServer; -import org.activeio.packet.async.aio.AIOAsyncChannel; -import org.activeio.packet.async.aio.AIOSyncChannelServer; import org.activeio.packet.async.nio.NIOAsyncChannel; import org.activeio.packet.async.nio.NIOAsyncChannelServer; import org.activeio.packet.async.vmpipe.VMPipeAsyncChannelPipe; @@ -80,24 +78,6 @@ public class ChannelFactoryTest extends TestCase { } - public void testAIO() throws IOException, URISyntaxException, InterruptedException { - - if( aioDisabled ) { - return; - } - - createSynchObjects("aio://localhost:0"); - assertNotNull( syncChannelServer.getAdapter(AIOSyncChannelServer.class) ); - assertNotNull( clientSynchChannel.getAdapter(AIOAsyncChannel.class) ); - assertNotNull( serverSynchChannel.getAdapter(AIOAsyncChannel.class) ); - - createAsynchObjects("aio://localhost:0"); - assertNotNull( asyncChannelServer.getAdapter(AIOSyncChannelServer.class) ); - assertNotNull( clientAsyncChannel.getAdapter(AIOAsyncChannel.class) ); - assertNotNull( serverAsyncChannel.getAdapter(AIOAsyncChannel.class) ); - - } - public void testNIO() throws IOException, URISyntaxException, InterruptedException { createSynchObjects("nio://localhost:0"); diff --git a/activeio/activeio-core/src/test/org/activeio/oneport/OnePortAsyncChannelServerTest.java b/activeio/activeio-core/src/test/org/activeio/oneport/OnePortAsyncChannelServerTest.java index b6c9abfa6c..aedd5a9338 100644 --- a/activeio/activeio-core/src/test/org/activeio/oneport/OnePortAsyncChannelServerTest.java +++ b/activeio/activeio-core/src/test/org/activeio/oneport/OnePortAsyncChannelServerTest.java @@ -17,13 +17,14 @@ **/ package org.activeio.oneport; -import edu.emory.mathcs.backport.java.util.concurrent.ArrayBlockingQueue; -import edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue; -import edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor; -import edu.emory.mathcs.backport.java.util.concurrent.ThreadFactory; -import edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor; -import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit; -import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger; +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; + +import junit.framework.TestCase; import org.activeio.AcceptListener; import org.activeio.Channel; @@ -42,16 +43,13 @@ import org.activeio.stream.sync.socket.SocketMetadata; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import javax.naming.NamingException; - -import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URL; - -import junit.framework.TestCase; +import edu.emory.mathcs.backport.java.util.concurrent.ArrayBlockingQueue; +import edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue; +import edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor; +import edu.emory.mathcs.backport.java.util.concurrent.ThreadFactory; +import edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor; +import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit; +import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger; /** */ @@ -69,7 +67,7 @@ public class OnePortAsyncChannelServerTest extends TestCase { public void testIIOPAccept() throws Exception { serverPacketCounter.set(0); hitIIOPServer(); - String type = (String) resultSlot.poll(1000 * 5, TimeUnit.MILLISECONDS); + String type = (String) resultSlot.poll(10, TimeUnit.SECONDS); assertEquals("IIOP", type); // Verify that a request when through the one port. assertTrue(serverPacketCounter.get()>0); @@ -78,7 +76,7 @@ public class OnePortAsyncChannelServerTest extends TestCase { public void testHttpAccept() throws IOException, URISyntaxException, InterruptedException { serverPacketCounter.set(0); hitHttpServer(); - String type = (String) resultSlot.poll(1000 * 5 * 10000, TimeUnit.MILLISECONDS); + String type = (String) resultSlot.poll(60, TimeUnit.SECONDS); assertEquals("HTTP", type); // Verify that a request when through the one port. assertTrue(serverPacketCounter.get()>0);