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
This commit is contained in:
Hiram R. Chirino 2005-12-19 20:44:36 +00:00
parent a71263c1e5
commit 434b563eae
10 changed files with 69 additions and 146 deletions

View File

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project default="default" xmlns:j="jelly:core" xmlns:ant="jelly:ant">
<project default="default" xmlns:j="jelly:core" xmlns:ant="jelly:ant"
xmlns:license="license" xmlns:util="jelly:util" xmlns:maven="jelly:maven" xmlns:artifact="artifact">
<goal name="default">
<attainGoal name="jar:install"/>
</goal>
@ -37,6 +39,34 @@
</goal>
<postGoal name="test:compile"> <!-- Once the tests are compiled... install them -->
<ant:jar jarfile="${maven.build.dir}/${pom.artifactId}-test-${pom.currentVersion}.jar"
basedir="${maven.test.dest}" index="${maven.jar.index}" compress="${maven.jar.compress}"
excludes="${maven.jar.excludes}">
<j:if test="${maven.jar.manifest.available}">
<ant:setProperty name="manifest" value="${maven.jar.manifest}" />
</j:if>
<j:if test="${context.getVariable('maven.jar.includes') != null}">
<ant:setProperty name="includes" value="${maven.jar.includes}" />
</j:if>
<j:set var="licenseFileName">
<license:fileName />
</j:set>
<util:file name="${licenseFileName}" var="licenseFile" />
<ant:metainf dir="${licenseFile.canonicalFile.parent}">
<ant:include name="${licenseFile.canonicalFile.name}" />
</ant:metainf>
</ant:jar>
<mkdir dir="${maven.repo.local}/${pom.groupId}/jars" />
<copy todir="${maven.repo.local}/${pom.groupId}/jars" file="${maven.build.dir}/${pom.artifactId}-test-${pom.currentVersion}.jar" />
</postGoal>
<preGoal name="test:test">
<j:choose>
<j:when test="${context.getVariable('os.name').startsWith('Windows')}">

View File

@ -1,97 +1,20 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>activeio</groupId>
<artifactId>activeio</artifactId>
<name>ActiveIO</name>
<version>2.1</version>
<parent>
<groupId>activemq</groupId>
<artifactId>activemq</artifactId>
<version>4.0-SNAPSHOT</version>
</parent>
<artifactId>activeio-core</artifactId>
<name>ActiveIO :: Core</name>
<version>3.0-SNAPSHOT</version>
<description></description>
<url>http://activeio.org/</url>
<mailingLists>
<mailingList>
<name>activeio dev</name>
<subscribe>dev-subscribe@activeio.codehaus.org</subscribe>
<unsubscribe>dev-unsubscribe@activeio.codehaus.org</unsubscribe>
</mailingList>
<mailingList>
<name>activeio users</name>
<subscribe>user-subscribe@activeio.codehaus.org</subscribe>
<unsubscribe>user-unsubscribe@activeio.codehaus.org</unsubscribe>
</mailingList>
<mailingList>
<name>activeio svn messages</name>
<subscribe>scm-subscribe@activeio.codehaus.org</subscribe>
<unsubscribe>scm-unsubscribe@activeio.codehaus.org</unsubscribe>
</mailingList>
</mailingLists>
<developers>
<developer>
<id>chirino</id>
<name>Hiram Chirino</name>
<email>hiram@hiramchirino.com</email>
<organization></organization>
<roles>
<role>Founder</role>
</roles>
</developer>
<developer>
<id>adc</id>
<name>Alan D. Cabrera</name>
<email>adc@toolazydogs.com</email>
<organization></organization>
<roles>
<role>Founder</role>
</roles>
</developer>
<developer>
<id>dblevins</id>
<name>David Blevins</name>
<email>dblevins@gluecode.com</email>
<organization></organization>
<roles>
<role>Founder</role>
</roles>
</developer>
</developers>
<scm>
<connection>scm:svn:hvttps://svn.codehaus.org/activeio/trunk/activeio</connection>
<developerConnection>scm:svn:svn+ssh://svn.activeio.org/home/projects/activeio/scm/trunk/activeio</developerConnection>
<url>http://svn.activeio.org/viewcvs.cgi/activeio/</url>
</scm>
<organization>
<name>The AsctiveIO Project</name>
<url>http://activeio.org</url>
</organization>
<build>
<sourceDirectory>src/java</sourceDirectory>
<testSourceDirectory>src/test</testSourceDirectory>
<resources>
<resource>
<directory>src/resources</directory>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>surefire</artifactId>
<configuration>
<includes>
<include>**/*Test.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>backport-util-concurrent</groupId>
@ -113,16 +36,19 @@
<artifactId>jxta</artifactId>
<version>2.0</version>
</dependency>
<!--
<dependency>
<groupId>ibmaio</groupId>
<artifactId>ibmaio</artifactId>
<version>1.0</version>
</dependency>
-->
<dependency>
<groupId>jetty</groupId>
<artifactId>org.mortbay.jetty</artifactId>
<version>5.1.2-SNAPSHOT</version>
</dependency>
<!--
<dependency>
<groupId>openorb</groupId>
<artifactId>openorb-orb</artifactId>
@ -153,6 +79,7 @@
<artifactId>avalon-logkit</artifactId>
<version>1.2.2</version>
</dependency>
-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@ -199,16 +126,5 @@
<version>3.0.1</version>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>default</id>
<name>Default Repository</name>
<url>dist.codehaus.org//dist</url>
</repository>
<site>
<id>default</id>
<name>Default Site</name>
<url>scp://www.activeio.org//home/projects/activeio/public_html/maven</url>
</site>
</distributionManagement>
</project>

View File

@ -18,11 +18,11 @@
<project>
<pomVersion>3</pomVersion>
<extend>${basedir}/../etc/project.xml</extend>
<extend>${basedir}/../../etc/project.xml</extend>
<currentVersion>3.0-SNAPSHOT</currentVersion>
<name>ActiveIO</name>
<artifactId>activeio</artifactId>
<name>ActiveIO :: Core</name>
<artifactId>activeio-core</artifactId>
<package>org.activeio</package>
<packageGroups>

View File

@ -1 +0,0 @@
AsyncChannelFactory.class=org.activeio.packet.async.aio.AIOAsyncChannelFactory

View File

@ -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");

View File

@ -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);