JBoss Remoting SVN: r4568 - in remoting3/trunk: compat and 15 other directories.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-09-16 20:59:12 -0400 (Tue, 16 Sep 2008)
New Revision: 4568
Removed:
remoting3/trunk/api/.classpath
remoting3/trunk/compat/.classpath
remoting3/trunk/core/.classpath
remoting3/trunk/http-se6/.classpath
remoting3/trunk/http-servlet/.classpath
remoting3/trunk/http-urlconnection/.classpath
remoting3/trunk/http/.classpath
remoting3/trunk/mc-deployers/.classpath
remoting3/trunk/samples/.classpath
remoting3/trunk/sasl-null/.classpath
remoting3/trunk/srp/.classpath
remoting3/trunk/standalone/.classpath
remoting3/trunk/testing-support/.classpath
remoting3/trunk/tools/.classpath
remoting3/trunk/transaction/.classpath
remoting3/trunk/util/.classpath
remoting3/trunk/version/.classpath
Log:
Remove classpath files due to lack of maintenance
Deleted: remoting3/trunk/api/.classpath
===================================================================
--- remoting3/trunk/api/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/api/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-util"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
Deleted: remoting3/trunk/compat/.classpath
===================================================================
--- remoting3/trunk/compat/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/compat/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-api"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-util"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
Deleted: remoting3/trunk/core/.classpath
===================================================================
--- remoting3/trunk/core/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/core/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-api"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-log-jul"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-version"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-util"/>
- <classpathentry kind="var" path="JBOSS_REPO/jboss-serialization/1.1.0-snapshot-r358/lib/jboss-serialization.jar"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
Deleted: remoting3/trunk/http/.classpath
===================================================================
--- remoting3/trunk/http/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/http/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-api"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-util"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
Deleted: remoting3/trunk/http-se6/.classpath
===================================================================
--- remoting3/trunk/http-se6/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/http-se6/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-http"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-api"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-util"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
Deleted: remoting3/trunk/http-servlet/.classpath
===================================================================
--- remoting3/trunk/http-servlet/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/http-servlet/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-http"/>
- <classpathentry kind="var" path="JBOSS_REPO/sun-servlet/2.4/lib/servlet-api.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-api"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-util"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
Deleted: remoting3/trunk/http-urlconnection/.classpath
===================================================================
--- remoting3/trunk/http-urlconnection/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/http-urlconnection/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-http"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-api"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-util"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
Deleted: remoting3/trunk/mc-deployers/.classpath
===================================================================
--- remoting3/trunk/mc-deployers/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/mc-deployers/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-log-jboss"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-core"/>
- <classpathentry kind="var" path="JBOSS_REPO/sun-jaxb/2.0.5/lib/jaxb-api.jar"/>
- <classpathentry kind="var" path="JBOSS_REPO/jboss-common-logging-spi/2.0.4.GA/lib/jboss-common-logging-spi-2.0.4.GA.jar"/>
- <classpathentry kind="var" path="JBOSS_REPO/jboss-common-core/2.2.0.GA/lib/jboss-common-core-2.2.0.GA.jar"/>
- <classpathentry kind="var" path="JBOSS_REPO/jbossxb/2.0.0.CR5/lib/jboss-xml-binding.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-api"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-util"/>
- <classpathentry kind="var" path="JBOSS_REPO/jboss-microcontainer/2.0.0.Beta11/lib/jboss-kernel.jar"/>
- <classpathentry kind="var" path="JBOSS_REPO/jboss-deployers/2.0.0.Beta11/lib/jboss-deployers-core-spi.jar"/>
- <classpathentry kind="var" path="JBOSS_REPO/jboss-deployers/2.0.0.Beta11/lib/jboss-deployers-spi.jar"/>
- <classpathentry kind="var" path="JBOSS_REPO/jboss-deployers/2.0.0.Beta11/lib/jboss-deployers-structure-spi.jar"/>
- <classpathentry kind="var" path="JBOSS_REPO/jboss-managed/2.0.0.Beta10.1/lib/jboss-managed.jar"/>
- <classpathentry kind="var" path="JBOSS_REPO/jboss-microcontainer/2.0.0.Beta11/lib/jboss-dependency.jar"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
Deleted: remoting3/trunk/samples/.classpath
===================================================================
--- remoting3/trunk/samples/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/samples/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-api"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
Deleted: remoting3/trunk/sasl-null/.classpath
===================================================================
--- remoting3/trunk/sasl-null/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/sasl-null/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
Deleted: remoting3/trunk/srp/.classpath
===================================================================
--- remoting3/trunk/srp/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/srp/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-log-jul"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-util"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
Deleted: remoting3/trunk/standalone/.classpath
===================================================================
--- remoting3/trunk/standalone/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/standalone/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-jrpp"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-api"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-core"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-log-jul"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-util"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
Deleted: remoting3/trunk/testing-support/.classpath
===================================================================
--- remoting3/trunk/testing-support/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/testing-support/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
Deleted: remoting3/trunk/tools/.classpath
===================================================================
--- remoting3/trunk/tools/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/tools/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-srp"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-util"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
Deleted: remoting3/trunk/transaction/.classpath
===================================================================
--- remoting3/trunk/transaction/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/transaction/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/remoting3-api"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
Deleted: remoting3/trunk/util/.classpath
===================================================================
--- remoting3/trunk/util/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/util/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
Deleted: remoting3/trunk/version/.classpath
===================================================================
--- remoting3/trunk/version/.classpath 2008-09-17 00:58:25 UTC (rev 4567)
+++ remoting3/trunk/version/.classpath 2008-09-17 00:59:12 UTC (rev 4568)
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="target/main/classes"/>
-</classpath>
16 years, 2 months
JBoss Remoting SVN: r4567 - remoting3/trunk/api/src/main/java/org/jboss/cx/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-09-16 20:58:25 -0400 (Tue, 16 Sep 2008)
New Revision: 4567
Removed:
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/RemoteServiceRegistration.java
Log:
Remove useless leftover class
Deleted: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/RemoteServiceRegistration.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/RemoteServiceRegistration.java 2008-09-11 19:54:37 UTC (rev 4566)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/RemoteServiceRegistration.java 2008-09-17 00:58:25 UTC (rev 4567)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.cx.remoting;
-
-/**
- *
- */
-public interface RemoteServiceRegistration extends HandleableCloseable<RemoteServiceRegistration> {
-}
16 years, 2 months
JBoss Remoting SVN: r4566 - in remoting3/trunk: api/src/main/java/org/jboss/cx/remoting/spi/stream and 5 other directories.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-09-11 15:54:37 -0400 (Thu, 11 Sep 2008)
New Revision: 4566
Added:
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/stream/StreamContext.java
remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/OrderedExecutor.java
remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/OrderedExecutorFactory.java
Removed:
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/util/DelegatingObjectInput.java
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/util/OrderedExecutorFactory.java
Modified:
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/stream/StreamSerializerFactory.java
remoting3/trunk/build.properties
remoting3/trunk/build.xml
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/stream/InputStreamStreamSerializerFactory.java
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/stream/ObjectSourceStreamSerializerFactory.java
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/stream/OutputStreamStreamSerailizerFactory.java
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicHandler.java
Log:
Initial switch towards new marshalling to replace old
Added: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/stream/StreamContext.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/stream/StreamContext.java (rev 0)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/stream/StreamContext.java 2008-09-11 19:54:37 UTC (rev 4566)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.cx.remoting.spi.stream;
+
+import java.util.concurrent.Executor;
+import org.jboss.marshalling.MarshallerFactory;
+
+/**
+ * A context for stream serialization.
+ */
+public interface StreamContext {
+
+ /**
+ * Get an executor which may be used for various asynchronous tasks.
+ *
+ * @return an executor
+ */
+ Executor getExecutor();
+
+ /**
+ * Get a marshaller factory which is configured compatibly with the channel.
+ *
+ * @return the marshaller factory
+ */
+ MarshallerFactory getMarshallerFactory();
+}
Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/stream/StreamSerializerFactory.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/stream/StreamSerializerFactory.java 2008-09-09 14:05:02 UTC (rev 4565)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/stream/StreamSerializerFactory.java 2008-09-11 19:54:37 UTC (rev 4566)
@@ -2,15 +2,36 @@
import org.jboss.xnio.IoHandler;
import org.jboss.xnio.ChannelSource;
-import org.jboss.xnio.channels.StreamChannel;
+import org.jboss.xnio.channels.AllocatedMessageChannel;
import java.io.IOException;
import java.io.Serializable;
/**
- *
+ * A factory for stream serializers. Stream serializers are responsible for forwarding streams across the network
+ * in a manner specific to the stream type.
*/
public interface StreamSerializerFactory extends Serializable {
- IoHandler<? super StreamChannel> getLocalSide(Object localSide) throws IOException;
- Object getRemoteSide(ChannelSource<StreamChannel> remoteClient) throws IOException;
+ /**
+ * Get the XNIO handler for the local side of the serializer. This side will access the local instance. The returned
+ * handler is attached to the channel that is associated with the stream instance.
+ *
+ * @param localSide the instance that is being serialized
+ * @param streamContext the stream context
+ * @return the local handler
+ * @throws IOException if an error occurs while preparing the handler
+ */
+ IoHandler<? super AllocatedMessageChannel> getLocalSide(Object localSide, StreamContext streamContext) throws IOException;
+
+ /**
+ * Get the remote proxy instance for the remote side of the serializer. This side will emulate the streaming object
+ * on the remote side. This method is responsible for initiating the communications channel, which the returned
+ * instance will use to transmit data.
+ *
+ * @param channelSource the channel source which is used to create the stream's channel
+ * @param streamContext the stream context
+ * @return the remote proxy instance
+ * @throws IOException if an error occurs while preparing the handler
+ */
+ Object getRemoteSide(ChannelSource<AllocatedMessageChannel> channelSource, StreamContext streamContext) throws IOException;
}
Modified: remoting3/trunk/build.properties
===================================================================
--- remoting3/trunk/build.properties 2008-09-09 14:05:02 UTC (rev 4565)
+++ remoting3/trunk/build.properties 2008-09-11 19:54:37 UTC (rev 4566)
@@ -9,7 +9,7 @@
# Dependencies - keep in alpha order by property name
# ===================================================
-lib.apiviz.version=1.0.5
+lib.apiviz.version=1.2.3.GA
lib.apiviz.name=apiviz-${lib.apiviz.version}.jar
lib.apiviz.license=lgpl
lib.apiviz.dir=apiviz/${lib.apiviz.version}/lib
Modified: remoting3/trunk/build.xml
===================================================================
--- remoting3/trunk/build.xml 2008-09-09 14:05:02 UTC (rev 4565)
+++ remoting3/trunk/build.xml 2008-09-11 19:54:37 UTC (rev 4566)
@@ -1300,21 +1300,25 @@
<!-- JAVADOCS -->
<!-- ============================================== -->
- <target name="api-javadoc" depends="api,core,standalone,util,lib.apiviz">
+ <target name="api-javadoc" depends="api,core,standalone,util,lib.apiviz,lib.jboss-marshalling-api,lib.xnio-api">
<delete dir="api/target/main/docs"/>
<mkdir dir="api/target/main/docs"/>
<javadoc destdir="api/target/main/docs" author="false" version="false" use="false" windowtitle="JBoss Remoting API">
<doclet name="${lib.apiviz.doclet}" path="${lib.apiviz.local}"/>
<packageset dir="api/src/main/java"/>
+ <packageset dir="standalone/src/main/java"/>
<packageset dir="util/src/main/java"/>
- <packageset dir="standalone/src/main/java"/>
<doctitle><![CDATA[<h1>JBoss Remoting 3</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 2008 JBoss, a division of Red Hat, Inc.</i>]]></bottom>
<link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
<link href="http://docs.jboss.org/xnio/1.0/api/"/>
<classpath>
<path refid="core.classpath"/>
+ <path refid="api.classpath"/>
+ <path refid="standalone.classpath"/>
+ <path refid="util.classpath"/>
<pathelement location="${lib.xnio-api.local}"/>
+ <pathelement location="${lib.jboss-marshalling-api.local}"/>
</classpath>
</javadoc>
</target>
Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java 2008-09-09 14:05:02 UTC (rev 4565)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java 2008-09-11 19:54:37 UTC (rev 4566)
@@ -18,7 +18,7 @@
import org.jboss.cx.remoting.ClientSource;
import org.jboss.cx.remoting.SimpleCloseable;
import org.jboss.cx.remoting.ServiceListener;
-import org.jboss.cx.remoting.core.util.OrderedExecutorFactory;
+import org.jboss.cx.remoting.util.OrderedExecutorFactory;
import org.jboss.cx.remoting.spi.remote.RequestHandler;
import org.jboss.cx.remoting.spi.remote.RequestHandlerSource;
import org.jboss.cx.remoting.spi.remote.Handle;
Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/stream/InputStreamStreamSerializerFactory.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/stream/InputStreamStreamSerializerFactory.java 2008-09-09 14:05:02 UTC (rev 4565)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/stream/InputStreamStreamSerializerFactory.java 2008-09-11 19:54:37 UTC (rev 4566)
@@ -3,14 +3,15 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
+import java.io.InterruptedIOException;
import java.nio.ByteBuffer;
+import java.util.concurrent.Executor;
import org.jboss.xnio.log.Logger;
import org.jboss.cx.remoting.spi.stream.StreamSerializerFactory;
-import org.jboss.cx.remoting.core.util.DecodingBuilder;
-import org.jboss.xnio.channels.StreamChannel;
-import org.jboss.xnio.channels.StreamSinkChannel;
-import org.jboss.xnio.channels.CommonOptions;
-import org.jboss.xnio.channels.StreamSourceChannel;
+import org.jboss.cx.remoting.spi.stream.StreamContext;
+import org.jboss.xnio.channels.AllocatedMessageChannel;
+import org.jboss.xnio.channels.WritableMessageChannel;
+import org.jboss.xnio.channels.ReadableAllocatedMessageChannel;
import org.jboss.xnio.IoHandler;
import org.jboss.xnio.ChannelSource;
import org.jboss.xnio.IoUtils;
@@ -21,9 +22,9 @@
/**
* An input stream serializer. The input stream transfer protocol consists of two types of "chunks": data and error.
- * A data chunk starts with an ASCII {@code 'd'}, followed by a two-byte (unsigned) length field (a value of
- * {@code 0x0000} indicates a 65536-byte chunk), followed by the actual data. An error chunk consists of a series of
- * UTF-8 bytes representing a description of the error, followed by the end of the stream.
+ * A data chunk starts with an ASCII {@code 'd'}, followed by the actual data. An error chunk starts with an ASCII
+ * {@code 'e'} followed by a series of UTF-8 bytes representing a description of the error, followed by the end of
+ * the stream.
*
* Normally data chunks are transferred over the stream until the original {@link InputStream} is exhausted, at which time
* the proxy stream will return a {@code -1} for the EOF condition.
@@ -39,13 +40,13 @@
// no-arg constructor required
}
- public IoHandler<StreamSinkChannel> getLocalSide(final Object localSide) throws IOException {
- return new LocalHandler((InputStream) localSide, allocator);
+ public IoHandler<? super AllocatedMessageChannel> getLocalSide(final Object localSide, final StreamContext streamContext) throws IOException {
+ return new LocalHandler((InputStream) localSide, allocator, streamContext.getExecutor());
}
- public Object getRemoteSide(final ChannelSource<StreamChannel> remoteClient) throws IOException {
-// return new RemoteInputStream(taskList, futureChannel);
- return null;
+ public Object getRemoteSide(final ChannelSource<AllocatedMessageChannel> remoteClient, final StreamContext streamContext) throws IOException {
+ final RemoteHandler handler = new RemoteHandler();
+ return new RemoteInputStream(remoteClient.open(handler), allocator, handler);
}
public BufferAllocator<ByteBuffer> getAllocator() {
@@ -56,345 +57,273 @@
this.allocator = allocator;
}
- private static final byte DATA_CHUNK = (byte) 'd';
- private static final byte ERROR = (byte) 'e';
+ private static final int DATA_CHUNK = 'd';
+ private static final int ERROR = 'e';
- public static final class LocalHandler implements IoHandler<StreamSinkChannel> {
+ public static final class LocalHandler implements IoHandler<WritableMessageChannel> {
- // @protectedby {@code this}
- private final InputStream inputStream;
+ private final Object lock = new Object();
+ private final Executor executor;
private final BufferAllocator<ByteBuffer> allocator;
- private volatile ByteBuffer current;
- private volatile boolean eof;
+ private final Runnable fillTask = new FillTask();
- private LocalHandler(final InputStream inputStream, final BufferAllocator<ByteBuffer> allocator) {
+ // @protectedby {@code lock}
+ private WritableMessageChannel channel;
+ // @protectedby {@code lock}
+ private final InputStream inputStream;
+ // @protectedby {@code lock}
+ private ByteBuffer writing;
+ // @protectedby {@code lock}
+ private boolean eof;
+
+ private LocalHandler(final InputStream inputStream, final BufferAllocator<ByteBuffer> allocator, final Executor executor) {
this.inputStream = inputStream;
this.allocator = allocator;
+ this.executor = executor;
}
- private boolean fillBuffer() throws IOException {
- final ByteBuffer buffer = allocator.allocate();
- buffer.put(DATA_CHUNK);
- buffer.putShort((short) 0);
- final int cnt;
- if (buffer.hasArray()) {
- final byte[] a = buffer.array();
- final int off = buffer.arrayOffset();
- final int rem = Math.min(buffer.remaining(), 65536);
- cnt = inputStream.read(a, off, rem);
- if (cnt == -1) {
- return false;
- }
- skip(current, cnt);
- } else {
- final int rem = Math.min(buffer.remaining(), 65536);
- final byte[] a = new byte[rem];
- cnt = inputStream.read(a);
- if (cnt == -1) {
- return false;
- }
- current.put(a);
- }
- buffer.putShort(1, (short) cnt);
- current = flip(buffer);
- return true;
+ public void handleOpened(final WritableMessageChannel channel) {
+ this.channel = channel;
+ executor.execute(fillTask);
}
- private void prepareChunk(final StreamSinkChannel channel) {
- try {
- eof = fillBuffer();
- } catch (Throwable e) {
- try {
- current = ByteBuffer.wrap(("e" + e.getMessage()).getBytes("utf-8"));
- } catch (UnsupportedEncodingException e1) {
- current = ByteBuffer.wrap(new byte[] { ERROR });
- }
- eof = true;
- }
- channel.resumeWrites();
+ public void handleReadable(final WritableMessageChannel channel) {
+ // not called on a sink channel
}
- public void handleOpened(final StreamSinkChannel channel) {
- if (channel.getOptions().contains(CommonOptions.TCP_NODELAY)) {
- try {
- channel.setOption(CommonOptions.TCP_NODELAY, Boolean.TRUE);
- } catch (IOException e) {
- // not too big a deal; just skip it
- log.trace(e, "Failed to enable TCP_NODELAY");
+ public void handleWritable(final WritableMessageChannel channel) {
+ synchronized (lock) {
+ final ByteBuffer buffer = writing;
+ if (buffer == null) {
+ if (eof) {
+ IoUtils.safeClose(channel);
+ } else {
+ executor.execute(fillTask);
+ }
+ } else {
+ final boolean sent;
+ try {
+ sent = channel.send(buffer);
+ } catch (IOException e) {
+ log.debug("Channel write failed: %s", e);
+ IoUtils.safeClose(channel);
+ return;
+ }
+ if (sent) {
+ writing = null;
+ allocator.free(buffer);
+ executor.execute(fillTask);
+ } else {
+ channel.resumeWrites();
+ }
}
}
- prepareChunk(channel);
}
- public void handleReadable(final StreamSinkChannel channel) {
- // not called on a sink channel
+ public void handleClosed(final WritableMessageChannel channel) {
+ synchronized (this) {
+ IoUtils.safeClose(inputStream);
+ }
}
- public void handleWritable(final StreamSinkChannel channel) {
- while (current.hasRemaining()) {
+ private final class FillTask implements Runnable {
+ public void run() {
try {
- final int c = channel.write(current);
- if (c == 0) {
- channel.resumeWrites();
- return;
+ final ByteBuffer buffer = allocator.allocate();
+ buffer.put((byte) DATA_CHUNK);
+ buffer.putShort((short) 0);
+ final int rem = buffer.remaining();
+ final int cnt;
+ if (buffer.hasArray()) {
+ final byte[] a = buffer.array();
+ final int off = buffer.arrayOffset();
+ cnt = inputStream.read(a, off, rem);
+ if (cnt == -1) {
+ synchronized (lock) {
+ eof = true;
+ return;
+ }
+ }
+ skip(buffer, cnt);
+ } else {
+ final byte[] a = new byte[rem];
+ cnt = inputStream.read(a);
+ if (cnt == -1) {
+ synchronized (lock) {
+ eof = true;
+ return;
+ }
+ }
+ buffer.put(a);
}
+ buffer.putShort(1, (short) cnt);
+ synchronized (lock) {
+ writing = flip(buffer);
+ }
+ channel.resumeWrites();
+ return;
} catch (IOException e) {
- log.debug("Channel write failed: %s", e);
- IoUtils.safeClose(channel);
+ synchronized (lock) {
+ eof = true;
+ try {
+ // this could probably be improved upon
+ writing = ByteBuffer.wrap((Character.toString((char) ERROR) + e.getMessage()).getBytes("utf-8"));
+ } catch (UnsupportedEncodingException e1) {
+ writing = ByteBuffer.wrap(new byte[] { ERROR });
+ }
+ }
}
}
- if (eof) {
- IoUtils.safeClose(channel);
- } else {
- prepareChunk(channel);
- }
}
-
- public void handleClosed(final StreamSinkChannel channel) {
- synchronized (this) {
- IoUtils.safeClose(inputStream);
- }
- }
}
- public static final class RemoteHandler implements IoHandler<StreamSourceChannel> {
+ public static final class RemoteHandler implements IoHandler<ReadableAllocatedMessageChannel> {
- private enum DecoderState {
- NEW_CHUNK,
- IN_ERROR,
- IN_DATA,
- }
+ private final Object lock = new Object();
- private final RemoteInputStream remoteInputStream;
- private final ByteBuffer initialBuffer = ByteBuffer.allocate(5);
+ private ByteBuffer current;
+ private boolean done;
+ private IOException exception;
- private volatile ByteBuffer dataBuffer = null;
+ private RemoteHandler() {
+ }
- private volatile DecodingBuilder exceptionBuilder;
- private volatile DecoderState decoderState = DecoderState.NEW_CHUNK;
-
- private RemoteHandler(final RemoteInputStream remoteInputStream, final BufferAllocator<ByteBuffer> allocator) {
- this.remoteInputStream = remoteInputStream;
+ public ByteBuffer getBuffer() throws IOException {
+ synchronized (lock) {
+ if (exception != null) {
+ final IOException ex = new IOException("I/O exception from channel receive");
+ ex.initCause(exception);
+ throw ex;
+ }
+ try {
+ while (current == null && ! done) {
+ lock.wait();
+ }
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw new InterruptedIOException("Interrupted while reading from input stream");
+ }
+ try {
+ return current;
+ } finally {
+ current = null;
+ }
+ }
}
- public void handleOpened(final StreamSourceChannel channel) {
+ public void handleOpened(final ReadableAllocatedMessageChannel channel) {
channel.resumeReads();
}
- public void handleReadable(final StreamSourceChannel channel) {
- try {
- for (;;) switch (decoderState) {
- case NEW_CHUNK: {
- int n = channel.read(initialBuffer);
- if (n == -1) {
- IoUtils.safeClose(channel);
- return;
+ public void handleReadable(final ReadableAllocatedMessageChannel channel) {
+ synchronized (lock) {
+ if (current != null) {
+ return;
+ }
+ try {
+ final ByteBuffer buffer = channel.receive();
+ if (buffer == null) {
+ IoUtils.safeClose(channel);
+ return;
+ }
+ if (! buffer.hasRemaining()) {
+ channel.resumeReads();
+ return;
+ }
+ final byte type = buffer.get();
+ switch (type) {
+ case DATA_CHUNK: {
+ current = buffer;
+ // only one waiter would be able to use this anyway
+ lock.notify();
+ break;
}
- if (n == 0) {
- remoteInputStream.scheduleResumeReads(channel);
- return;
- }
- if (initialBuffer.get(0) == DATA_CHUNK) {
- if (initialBuffer.hasRemaining()) {
- handleReadable(channel);
- return;
+ case ERROR: {
+ if (buffer.hasArray()) {
+ IoUtils.safeClose(channel);
+ final byte[] a = buffer.array();
+ final int offs = buffer.arrayOffset();
+ final int rem = buffer.remaining();
+ exception = new IOException(new String(a, offs + 1, rem, "utf-8"));
}
- initialBuffer.flip();
- initialBuffer.get();
- final int length = (initialBuffer.getShort() - 1) & 0xffff + 1;
- dataBuffer = ByteBuffer.allocate(length);
- decoderState = DecoderState.IN_DATA;
break;
- } else if (initialBuffer.get(0) == ERROR) {
- decoderState = DecoderState.IN_ERROR;
- initialBuffer.flip();
- initialBuffer.get();
- exceptionBuilder.append(initialBuffer);
- initialBuffer.clear();
- break;
- } else {
- remoteInputStream.acceptException("Received garbage from remote side");
- IoUtils.safeClose(channel);
- return;
}
- }
- case IN_ERROR: {
- ByteBuffer buffer = ByteBuffer.allocate(256);
- int n = channel.read(buffer);
- if (n == -1) {
- remoteInputStream.acceptException(exceptionBuilder.finish().toString());
- exceptionBuilder = null;
+ default: {
IoUtils.safeClose(channel);
- return;
+ exception = new IOException("Remote data stream was corrupted");
+ break;
}
- if (n == 0) {
- remoteInputStream.scheduleResumeReads(channel);
- return;
- }
- exceptionBuilder.append(buffer);
- break;
}
- case IN_DATA: {
- if (! dataBuffer.hasRemaining()) {
- dataBuffer.flip();
- remoteInputStream.acceptBuffer(dataBuffer);
- dataBuffer = null;
- decoderState = DecoderState.NEW_CHUNK;
- }
- int n = channel.read(dataBuffer);
- if (n == -1) {
- IoUtils.safeClose(channel);
- return;
- }
- if (n == 0) {
- remoteInputStream.scheduleResumeReads(channel);
- return;
- }
- break;
- }
+ } catch (IOException e) {
+ IoUtils.safeClose(channel);
+ // should only be one waiter, but just in case, notify em all so they all catch the exception...
+ exception = e;
}
- } catch (IOException e) {
- remoteInputStream.acceptException("Read from remote input stream failed: " + e.getMessage());
- IoUtils.safeClose(channel);
}
}
- public void handleWritable(final StreamSourceChannel channel) {
+ public void handleWritable(final ReadableAllocatedMessageChannel channel) {
+ // empty
}
- public void handleClosed(final StreamSourceChannel channel) {
- remoteInputStream.acceptEof();
+ public void handleClosed(final ReadableAllocatedMessageChannel channel) {
+ synchronized (lock) {
+ done = true;
+ lock.notifyAll();
+ }
}
}
public static final class RemoteInputStream extends InputStream {
- private enum StreamState {
- RUNNING,
- EOF,
- CLOSED,
- }
-
- private final IoFuture<StreamSourceChannel> futureChannel;
private final BufferAllocator<ByteBuffer> allocator;
private final Object lock = new Object();
// @protectedby lock
- private StreamState state;
private ByteBuffer current;
- private ByteBuffer next;
- private String pendingException;
- private boolean pendingResumeReads = false;
- private RemoteInputStream(final IoFuture<StreamSourceChannel> futureChannel, final BufferAllocator<ByteBuffer> allocator) {
+ private final IoFuture<? extends ReadableAllocatedMessageChannel> futureChannel;
+ private final RemoteHandler handler;
+
+ private RemoteInputStream(final IoFuture<? extends ReadableAllocatedMessageChannel> futureChannel, final BufferAllocator<ByteBuffer> allocator, final RemoteHandler handler) {
this.futureChannel = futureChannel;
this.allocator = allocator;
+ this.handler = handler;
}
- protected void acceptBuffer(ByteBuffer buffer) {
- synchronized (lock) {
- if (! buffer.hasRemaining()) {
- throw new IllegalArgumentException("empty buffer");
- }
- if (state == StreamState.CLOSED) {
- allocator.free(buffer);
- }
- if (current == null) {
+ // call under {@code lock}
+ private ByteBuffer getCurrent() throws IOException {
+ if (current != null) {
+ return current;
+ } else {
+ final ByteBuffer buffer = handler.getBuffer();
+ if (buffer != null) {
current = buffer;
- lock.notifyAll();
- } else if (next == null) {
- next = buffer;
+ return buffer;
} else {
- throw new IllegalStateException();
+ return null;
}
}
}
- protected void acceptException(String exception) {
- synchronized (lock) {
- pendingException = exception;
- if (current == null) {
- lock.notifyAll();
- }
- }
- }
-
- protected void acceptEof() {
- synchronized (lock) {
- if (state == StreamState.RUNNING) {
- state = StreamState.EOF;
- if (current == null) {
- lock.notifyAll();
- }
- }
- }
- }
-
- protected void scheduleResumeReads(StreamSourceChannel channel) {
- synchronized (lock) {
- if (state == StreamState.CLOSED || state == StreamState.EOF) {
- return;
- }
- if (next == null || current == null) {
- channel.resumeReads();
- } else {
- pendingResumeReads = true;
- }
- }
- }
-
- private ByteBuffer getCurrent() throws IOException {
- boolean intr = false;
- try {
- while (current == null) {
- if (pendingException != null) {
- throw new IOException(pendingException);
- } else if (state == StreamState.EOF) {
- return null;
- }
- try {
- lock.wait();
- } catch (InterruptedException e) {
- intr = true;
- }
- }
- return current;
- } finally {
- if (intr) {
- Thread.currentThread().interrupt();
- }
- }
- }
-
public int read() throws IOException {
synchronized (lock) {
- if (state == StreamState.CLOSED) {
- return -1;
- }
final ByteBuffer buffer = getCurrent();
if (buffer == null) {
return -1;
}
final byte v = buffer.get();
if (! buffer.hasRemaining()) {
- current = next;
- next = null;
+ current = null;
allocator.free(buffer);
- if (pendingResumeReads) {
- futureChannel.get().resumeReads();
- pendingResumeReads = false;
- }
}
return v & 0xff;
}
}
- public int read(final byte b[], final int off, final int len) throws IOException {
+ public int read(final byte[] b, final int off, final int len) throws IOException {
synchronized (lock) {
- if (state == StreamState.CLOSED) {
- return -1;
- }
final ByteBuffer buffer = getCurrent();
if (buffer == null) {
return -1;
@@ -402,13 +331,8 @@
final int cnt = Math.min(buffer.remaining(), len);
buffer.get(b, off, cnt);
if (! buffer.hasRemaining()) {
- current = next;
- next = null;
+ current = null;
allocator.free(buffer);
- if (pendingResumeReads) {
- futureChannel.get().resumeReads();
- pendingResumeReads = false;
- }
}
return cnt;
}
@@ -416,24 +340,17 @@
public void close() throws IOException {
synchronized (lock) {
- if (state != StreamState.CLOSED) {
- if (current != null) {
- allocator.free(current);
- current = null;
- }
- if (next != null) {
- allocator.free(next);
- next = null;
- }
- state = StreamState.CLOSED;
- futureChannel.get().close();
+ if (current != null) {
+ allocator.free(current);
+ current = null;
}
+ futureChannel.get().close();
}
}
public int available() throws IOException {
synchronized (lock) {
- return current == null ? 0 : current.remaining() + (next == null ? 0 : next.remaining());
+ return current == null ? 0 : current.remaining();
}
}
}
Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/stream/ObjectSourceStreamSerializerFactory.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/stream/ObjectSourceStreamSerializerFactory.java 2008-09-09 14:05:02 UTC (rev 4565)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/stream/ObjectSourceStreamSerializerFactory.java 2008-09-11 19:54:37 UTC (rev 4566)
@@ -1,17 +1,23 @@
package org.jboss.cx.remoting.core.stream;
import java.io.IOException;
+import java.util.concurrent.Executor;
+import java.util.List;
+import java.util.ArrayList;
+import java.nio.ByteBuffer;
import org.jboss.cx.remoting.spi.stream.StreamSerializerFactory;
+import org.jboss.cx.remoting.spi.stream.StreamContext;
import org.jboss.cx.remoting.stream.ObjectSource;
-import org.jboss.xnio.channels.StreamChannel;
-import org.jboss.xnio.channels.StreamSourceChannel;
-import org.jboss.xnio.channels.StreamSinkChannel;
-import org.jboss.xnio.channels.CommonOptions;
+import org.jboss.xnio.channels.AllocatedMessageChannel;
import org.jboss.xnio.IoHandler;
import org.jboss.xnio.ChannelSource;
import org.jboss.xnio.IoUtils;
+import org.jboss.xnio.BufferAllocator;
+import static org.jboss.xnio.Buffers.flip;
import org.jboss.xnio.log.Logger;
import org.jboss.marshalling.MarshallerFactory;
+import org.jboss.marshalling.Marshaller;
+import org.jboss.marshalling.ByteOutput;
/**
*
@@ -22,7 +28,6 @@
private static final Logger log = Logger.getLogger(ObjectSourceStreamSerializerFactory.class);
-
private MarshallerFactory marshallerFactory;
public MarshallerFactory getMarshallerFactory() {
@@ -33,55 +38,159 @@
this.marshallerFactory = marshallerFactory;
}
- public IoHandler<? super StreamChannel> getLocalSide(final Object localSide) throws IOException {
-
+ public IoHandler<? super AllocatedMessageChannel> getLocalSide(final Object localSide, final StreamContext streamContext) throws IOException {
return null;
}
- public Object getRemoteSide(final ChannelSource<StreamChannel> remoteClient) throws IOException {
+ public Object getRemoteSide(final ChannelSource<AllocatedMessageChannel> channelSource, final StreamContext streamContext) throws IOException {
return null;
}
- public static class LocalHandler implements IoHandler<StreamSinkChannel> {
+ public static class LocalHandler implements IoHandler<AllocatedMessageChannel> {
private final ObjectSource objectSource;
+ private final Object lock = new Object();
+ private final Executor executor;
+ private final Marshaller marshaller;
+ private ByteBuffer[] current;
+ private final Runnable fillTask = new FillTask();
+ private final BufferAllocator<ByteBuffer> allocator;
- public LocalHandler(final ObjectSource source) {
+ public LocalHandler(final ObjectSource source, final Executor executor, final Marshaller marshaller, final BufferAllocator<ByteBuffer> allocator) {
objectSource = source;
+ this.executor = executor;
+ this.marshaller = marshaller;
+ this.allocator = allocator;
}
- public void handleOpened(final StreamSinkChannel channel) {
- if (channel.getOptions().contains(CommonOptions.TCP_NODELAY)) try {
- channel.setOption(CommonOptions.TCP_NODELAY, Boolean.TRUE);
- } catch (Exception e) {
- log.trace("Error setting TCP_NODELAY option: %s", e.getMessage());
- }
- channel.resumeWrites();
+ public void handleOpened(final AllocatedMessageChannel channel) {
+ executor.execute(fillTask);
}
- public void handleReadable(final StreamSinkChannel channel) {
+ public void handleReadable(final AllocatedMessageChannel channel) {
// not invoked
}
- public void handleWritable(final StreamSinkChannel channel) {
+ public void handleWritable(final AllocatedMessageChannel channel) {
}
- public void handleClosed(final StreamSinkChannel channel) {
+ public void handleClosed(final AllocatedMessageChannel channel) {
IoUtils.safeClose(objectSource);
}
+
+ public class FillTask implements Runnable {
+ public void run() {
+ try {
+ if (objectSource.hasNext()) {
+ final BufferProducingByteOutput output = new BufferProducingByteOutput(allocator);
+ try {
+ marshaller.start(output);
+ marshaller.writeObject(objectSource.next());
+ marshaller.finish();
+ output.flush();
+ final ByteBuffer[] buffers = output.takeBuffers();
+
+ } finally {
+ IoUtils.safeClose(output);
+ }
+
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
}
- public static class RemoteHandler implements IoHandler<StreamSourceChannel> {
+ public static class BufferProducingByteOutput implements ByteOutput {
- public void handleOpened(final StreamSourceChannel channel) {
+ private final BufferAllocator<ByteBuffer> allocator;
+ private final List<ByteBuffer> buffers = new ArrayList<ByteBuffer>();
+ private ByteBuffer current;
+
+ public BufferProducingByteOutput(final BufferAllocator<ByteBuffer> allocator) {
+ this.allocator = allocator;
}
- public void handleReadable(final StreamSourceChannel channel) {
+ public void write(final int i) throws IOException {
+ ByteBuffer buffer = current;
+ if (buffer == null) {
+ buffer = (current = allocator.allocate());
+ }
+ buffer.put((byte) i);
+ if (! buffer.hasRemaining()) {
+ buffers.add(flip(buffer));
+ current = null;
+ }
}
- public void handleWritable(final StreamSourceChannel channel) {
+ public void write(final byte[] bytes) throws IOException {
+ write(bytes, 0, bytes.length);
}
- public void handleClosed(final StreamSourceChannel channel) {
+ public void write(final byte[] bytes, int offs, int len) throws IOException {
+ while (len > 0) {
+ ByteBuffer buffer = current;
+ if (buffer == null) {
+ buffer = (current = allocator.allocate());
+ }
+ final int rem = Math.min(buffer.remaining(), len);
+ buffer.put(bytes, offs, rem);
+ offs += rem;
+ len -= rem;
+ if (! buffer.hasRemaining()) {
+ buffers.add(flip(buffer));
+ current = null;
+ }
+ }
}
+
+ public void close() throws IOException {
+ flush();
+ }
+
+ public void flush() throws IOException {
+ final ByteBuffer buffer = current;
+ if (buffer != null) {
+ buffers.add(buffer);
+ current = null;
+ }
+ }
+
+ public ByteBuffer[] takeBuffers() {
+ try {
+ return buffers.toArray(new ByteBuffer[buffers.size()]);
+ } finally {
+ buffers.clear();
+ }
+ }
}
+
+ public static class RemoteHandler implements IoHandler<AllocatedMessageChannel> {
+
+ public void handleOpened(final AllocatedMessageChannel channel) {
+ }
+
+ public void handleReadable(final AllocatedMessageChannel channel) {
+ }
+
+ public void handleWritable(final AllocatedMessageChannel channel) {
+ }
+
+ public void handleClosed(final AllocatedMessageChannel channel) {
+ }
+ }
+
+ public static class RemoteObjectSource implements ObjectSource {
+
+ public boolean hasNext() throws IOException {
+ return false;
+ }
+
+ public Object next() throws IOException {
+ return null;
+ }
+
+ public void close() throws IOException {
+ }
+ }
}
Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/stream/OutputStreamStreamSerailizerFactory.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/stream/OutputStreamStreamSerailizerFactory.java 2008-09-09 14:05:02 UTC (rev 4565)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/stream/OutputStreamStreamSerailizerFactory.java 2008-09-11 19:54:37 UTC (rev 4566)
@@ -2,13 +2,16 @@
import java.io.IOException;
import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.io.InterruptedIOException;
import java.nio.ByteBuffer;
import java.nio.channels.Channel;
-import java.util.concurrent.Semaphore;
+import java.util.concurrent.Executor;
import org.jboss.cx.remoting.spi.stream.StreamSerializerFactory;
-import org.jboss.xnio.channels.StreamChannel;
-import org.jboss.xnio.channels.StreamSourceChannel;
-import org.jboss.xnio.channels.StreamSinkChannel;
+import org.jboss.cx.remoting.spi.stream.StreamContext;
+import org.jboss.cx.remoting.util.OrderedExecutor;
+import org.jboss.xnio.channels.AllocatedMessageChannel;
+import org.jboss.xnio.channels.WritableMessageChannel;
import org.jboss.xnio.IoHandler;
import org.jboss.xnio.ChannelSource;
import org.jboss.xnio.BufferAllocator;
@@ -25,123 +28,196 @@
private static final long serialVersionUID = -5934238025840749071L;
- public IoHandler<? super StreamChannel> getLocalSide(final Object localSide) throws IOException {
- return new LocalHandler((OutputStream) localSide, new BufferAllocator<ByteBuffer>() {
- public ByteBuffer allocate() {
- return ByteBuffer.allocate(512);
- }
+ private BufferAllocator<ByteBuffer> allocator;
- public void free(final ByteBuffer byteBuffer) {
- }
- });
+ public BufferAllocator<ByteBuffer> getAllocator() {
+ return allocator;
}
- public Object getRemoteSide(final ChannelSource<StreamChannel> remoteClient) throws IOException {
- final RemoteHandler handler = new RemoteHandler(new BufferAllocator<ByteBuffer>() {
- public ByteBuffer allocate() {
- return ByteBuffer.allocate(512);
- }
+ public void setAllocator(final BufferAllocator<ByteBuffer> allocator) {
+ this.allocator = allocator;
+ }
- public void free(final ByteBuffer byteBuffer) {
- }
- });
- final IoFuture<StreamChannel> futureChannel = remoteClient.open(handler);
- return new RemoteOutputStream(handler, futureChannel);
+ public IoHandler<? super AllocatedMessageChannel> getLocalSide(final Object localSide, final StreamContext streamContext) throws IOException {
+ return new LocalHandler((OutputStream) localSide, allocator, new OrderedExecutor(streamContext.getExecutor()));
}
- public static final class LocalHandler implements IoHandler<StreamSourceChannel> {
+ public Object getRemoteSide(final ChannelSource<AllocatedMessageChannel> remoteClient, final StreamContext streamContext) throws IOException {
+ final RemoteHandler handler = new RemoteHandler(allocator);
+ final IoFuture<AllocatedMessageChannel> futureChannel = remoteClient.open(handler);
+ return new RemoteOutputStream(handler, futureChannel, allocator);
+ }
+ public static final class LocalHandler implements IoHandler<AllocatedMessageChannel> {
+
private final OutputStream outputStream;
private final BufferAllocator<ByteBuffer> allocator;
+ private final Executor executor;
+ private volatile String exceptionMessage;
- public LocalHandler(final OutputStream outputStream, final BufferAllocator<ByteBuffer> allocator) {
+ public LocalHandler(final OutputStream outputStream, final BufferAllocator<ByteBuffer> allocator, final Executor executor) {
this.outputStream = outputStream;
this.allocator = allocator;
+ this.executor = executor;
}
- public void handleOpened(final StreamSourceChannel channel) {
+ public void handleOpened(final AllocatedMessageChannel channel) {
channel.resumeReads();
}
- public void handleReadable(final StreamSourceChannel channel) {
- ByteBuffer buffer = allocator.allocate();
+ public void handleReadable(final AllocatedMessageChannel channel) {
try {
- for (;; buffer.clear()) {
- final int c = channel.read(buffer);
- if (c == 0) {
+ for (;;) {
+ final ByteBuffer buffer = channel.receive();
+ if (buffer == null) {
+ IoUtils.safeClose(channel);
+ log.trace("Remote output stream closed normally");
+ } else if (! buffer.hasRemaining()) {
channel.resumeReads();
return;
- } else if (c == -1) {
- IoUtils.safeClose(channel);
- log.trace("Remote output stream closed normally");
} else {
buffer.flip();
- if (buffer.hasArray()) {
- outputStream.write(buffer.array(), buffer.arrayOffset(), buffer.remaining());
- } else {
- final byte[] bytes = new byte[buffer.remaining()];
- buffer.get(bytes);
- outputStream.write(bytes);
- }
+ executor.execute(new Runnable() {
+ public void run() {
+ try {
+ if (buffer.hasArray()) {
+ outputStream.write(buffer.array(), buffer.arrayOffset(), buffer.remaining());
+ } else {
+ final byte[] bytes = new byte[buffer.remaining()];
+ buffer.get(bytes);
+ outputStream.write(bytes);
+ }
+ channel.resumeReads();
+ } catch (Throwable t) {
+ exceptionMessage = t.getMessage();
+ channel.resumeWrites();
+ try {
+ channel.shutdownReads();
+ } catch (Throwable tt) {
+ log.warn(tt, "Unable to shutdown reads on a channel");
+ }
+ } finally {
+ allocator.free(buffer);
+ }
+ }
+ });
}
}
} catch (IOException e) {
IoUtils.safeClose(channel);
log.trace("Remote output stream closed due to exception: %s", e.getMessage());
} finally {
- allocator.free(buffer);
}
}
- public void handleWritable(final StreamSourceChannel channel) {
+ public void handleWritable(final AllocatedMessageChannel channel) {
+ final String msg = exceptionMessage;
+ if (msg == null) {
+ // spurious...
+ return;
+ }
+ try {
+ final ByteBuffer buffer = ByteBuffer.wrap(msg.getBytes("utf-8"));
+ if (! channel.send(buffer)) {
+ channel.resumeWrites();
+ return;
+ }
+ } catch (UnsupportedEncodingException e) {
+ // should not happen; if it does, just close the channel
+ } catch (IOException e) {
+ // nothing we can do about it
+ }
+ IoUtils.safeClose(channel);
+ exceptionMessage = null;
}
- public void handleClosed(final StreamSourceChannel channel) {
+ public void handleClosed(final AllocatedMessageChannel channel) {
IoUtils.safeClose(outputStream);
}
}
- public static final class RemoteHandler implements IoHandler<StreamSinkChannel> {
+ public static final class RemoteHandler implements IoHandler<AllocatedMessageChannel> {
- private final Semaphore semaphore = new Semaphore(0);
+ private final Object lock = new Object();
private final BufferAllocator<ByteBuffer> allocator;
- private volatile boolean closed;
- private volatile ByteBuffer buffer;
+ private boolean closed;
+ private ByteBuffer buffer;
+ private IOException exception;
private RemoteHandler(final BufferAllocator<ByteBuffer> allocator) {
this.allocator = allocator;
}
- public void handleOpened(final StreamSinkChannel channel) {
- // block sends until the channel is up
- semaphore.release();
+ public void pushBuffer(final WritableMessageChannel channel, final ByteBuffer buffer) throws IOException {
+ synchronized (lock) {
+ final IOException exception = this.exception;
+ if (exception != null) {
+ this.exception = null;
+ IOException ioe = new IOException("Write failed");
+ ioe.initCause(exception);
+ throw ioe;
+ }
+ if (closed) {
+ throw new IOException("Channel closed");
+ }
+ while (this.buffer != null) {
+ try {
+ lock.wait();
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw new InterruptedIOException("Operation interrupted");
+ }
+ }
+ if (! channel.send(buffer)) {
+ channel.resumeWrites();
+ this.buffer = buffer;
+ }
+ }
}
- public void handleReadable(final StreamSinkChannel channel) {
+ public void handleOpened(final AllocatedMessageChannel channel) {
+ channel.resumeReads();
+ synchronized (lock) {
+ if (buffer != null) {
+ channel.resumeWrites();
+ }
+ }
}
- public void handleWritable(final StreamSinkChannel channel) {
- final ByteBuffer buffer = this.buffer;
- if (buffer != null) {
+ public void handleReadable(final AllocatedMessageChannel channel) {
+ try {
+ final ByteBuffer buffer = channel.receive();
+ if (buffer == null) {
+ // normal close
+ IoUtils.safeClose(channel);
+ }
+ } catch (IOException e) {
+ exception = new IOException("Received unexpected I/O exception");
+ exception.initCause(e);
+ IoUtils.safeClose(channel);
+ }
+ }
+
+ public void handleWritable(final AllocatedMessageChannel channel) {
+ synchronized (lock) {
+ final ByteBuffer buffer = this.buffer;
+ if (buffer == null) {
+ return;
+ }
try {
- while (buffer.hasRemaining()) {
- if (channel.write(buffer) == 0) {
- channel.resumeWrites();
- return;
- }
+ if (channel.send(buffer)) {
+ allocator.free(buffer);
+ this.buffer = null;
}
} catch (IOException e) {
- log.trace("Send exception: %s", e.getMessage());
+ exception = e;
IoUtils.safeClose(channel);
- semaphore.release();
}
- this.buffer = null;
- allocator.free(buffer);
}
}
- public void handleClosed(final StreamSinkChannel channel) {
+ public void handleClosed(final AllocatedMessageChannel channel) {
closed = true;
final ByteBuffer buffer = this.buffer;
if (buffer != null) {
@@ -149,80 +225,94 @@
allocator.free(buffer);
}
}
-
- private void send(final ByteBuffer buffer) throws IOException {
- if (closed) {
- throw new IOException("Channel closed");
- }
- semaphore.acquireUninterruptibly();
- if (closed) {
- semaphore.release();
- allocator.free(buffer);
- throw new IOException("Channel closed");
- }
- this.buffer = buffer;
- }
}
public static final class RemoteOutputStream extends OutputStream {
private final RemoteHandler handler;
- private final IoFuture<? extends Channel> futureChannel;
+ private final IoFuture<? extends WritableMessageChannel> futureChannel;
+ private final Object lock = new Object();
+ private final BufferAllocator<ByteBuffer> allocator;
private ByteBuffer buffer;
- public RemoteOutputStream(final RemoteHandler handler, final IoFuture<? extends Channel> futureChannel) {
+ public RemoteOutputStream(final RemoteHandler handler, final IoFuture<? extends WritableMessageChannel> futureChannel, final BufferAllocator<ByteBuffer> allocator) {
this.handler = handler;
this.futureChannel = futureChannel;
+ this.allocator = allocator;
+ synchronized (lock) {
+ buffer = allocator.allocate();
+ }
}
public void write(final int b) throws IOException {
- if (handler.closed) {
- throw new IOException("Channel closed");
+ synchronized (lock) {
+ final ByteBuffer buffer = this.buffer;
+ if (buffer == null) {
+ throw new IOException("Channel closed");
+ }
+ buffer.put((byte)b);
+ if (! buffer.hasRemaining()) {
+ flush();
+ }
}
- if (buffer == null) {
- buffer = handler.allocator.allocate();
- }
- buffer.put((byte)b);
- if (! buffer.hasRemaining()) {
- flush();
- }
}
public void write(final byte[] bytes, int offset, int length) throws IOException {
- if (handler.closed) {
- throw new IOException("Channel closed");
- }
- if (buffer == null) {
- buffer = handler.allocator.allocate();
- }
- while (length > 0) {
- int size = Math.min(buffer.remaining(), length);
- buffer.put(bytes, offset, size);
- length -= size; offset += size;
- if (! buffer.hasRemaining()) {
- flush();
+ synchronized (lock) {
+ while (length > 0) {
+ final ByteBuffer buffer = this.buffer;
+ if (buffer == null) {
+ throw new IOException("Channel closed");
+ }
+ int size = Math.min(buffer.remaining(), length);
+ buffer.put(bytes, offset, size);
+ length -= size; offset += size;
+ if (! buffer.hasRemaining()) {
+ flush();
+ }
}
}
}
public void flush() throws IOException {
- try {
- handler.send(buffer);
- } finally {
- buffer = null;
+ synchronized (lock) {
+ if (doFlush()) {
+ buffer = allocator.allocate();
+ }
}
}
+ private boolean doFlush() throws IOException {
+ final ByteBuffer buffer = this.buffer;
+ if (buffer != null) {
+ handler.pushBuffer(futureChannel.get(), buffer);
+ return true;
+ } else {
+ return false;
+ }
+ }
+
public void close() throws IOException {
final Channel channel;
try {
channel = futureChannel.get();
+ if (channel == null) {
+ return;
+ }
} catch (IOException ex) {
// throwing this exception would cause close() to appear to not be idempotent
log.trace("No channel to close: %s", ex.getMessage());
return;
}
- channel.close();
+ try {
+ synchronized (lock) {
+ doFlush();
+ buffer = null;
+ }
+ channel.close();
+ } finally {
+ IoUtils.safeClose(channel);
+ }
}
}
}
Deleted: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/util/DelegatingObjectInput.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/util/DelegatingObjectInput.java 2008-09-09 14:05:02 UTC (rev 4565)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/util/DelegatingObjectInput.java 2008-09-11 19:54:37 UTC (rev 4566)
@@ -1,103 +0,0 @@
-package org.jboss.cx.remoting.core.util;
-
-import java.io.IOException;
-import java.io.ObjectInput;
-
-/**
- *
- */
-public class DelegatingObjectInput implements ObjectInput {
- private final ObjectInput delegate;
-
- public DelegatingObjectInput(final ObjectInput delegate) {
- this.delegate = delegate;
- }
-
- public int read() throws IOException {
- return delegate.read();
- }
-
- public int read(final byte[] data) throws IOException {
- return delegate.read(data);
- }
-
- public int read(final byte[] data, final int offs, final int len) throws IOException {
- return delegate.read(data, offs, len);
- }
-
- public void close() throws IOException {
- delegate.close();
- }
-
- public Object readObject() throws ClassNotFoundException, IOException {
- return delegate.readObject();
- }
-
- public long skip(final long n) throws IOException {
- return delegate.skip(n);
- }
-
- public int available() throws IOException {
- return delegate.available();
- }
-
- public void readFully(final byte[] b) throws IOException {
- delegate.readFully(b);
- }
-
- public void readFully(final byte[] b, final int off, final int len) throws IOException {
- delegate.readFully(b, off, len);
- }
-
- public int skipBytes(final int n) throws IOException {
- return delegate.skipBytes(n);
- }
-
- public boolean readBoolean() throws IOException {
- return delegate.readBoolean();
- }
-
- public byte readByte() throws IOException {
- return delegate.readByte();
- }
-
- public int readUnsignedByte() throws IOException {
- return delegate.readUnsignedByte();
- }
-
- public short readShort() throws IOException {
- return delegate.readShort();
- }
-
- public int readUnsignedShort() throws IOException {
- return delegate.readUnsignedShort();
- }
-
- public char readChar() throws IOException {
- return delegate.readChar();
- }
-
- public int readInt() throws IOException {
- return delegate.readInt();
- }
-
- public long readLong() throws IOException {
- return delegate.readLong();
- }
-
- public float readFloat() throws IOException {
- return delegate.readFloat();
- }
-
- public double readDouble() throws IOException {
- return delegate.readDouble();
- }
-
- public String readLine() throws IOException {
- return delegate.readLine();
- }
-
- public String readUTF() throws IOException {
- return delegate.readUTF();
- }
-}
Deleted: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/util/OrderedExecutorFactory.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/util/OrderedExecutorFactory.java 2008-09-09 14:05:02 UTC (rev 4565)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/util/OrderedExecutorFactory.java 2008-09-11 19:54:37 UTC (rev 4566)
@@ -1,50 +0,0 @@
-package org.jboss.cx.remoting.core.util;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.Set;
-import java.util.concurrent.Executor;
-
-/**
- *
- */
-public final class OrderedExecutorFactory {
- private final Executor parent;
- private final Set<ChildExecutor> runningChildren = Collections.synchronizedSet(new HashSet<ChildExecutor>());
-
- public OrderedExecutorFactory(final Executor parent) {
- this.parent = parent;
- }
-
- public Executor getOrderedExecutor() {
- return new ChildExecutor();
- }
-
- private final class ChildExecutor implements Executor, Runnable {
- private final LinkedList<Runnable> tasks = new LinkedList<Runnable>();
-
- public void execute(Runnable command) {
- synchronized(tasks) {
- tasks.add(command);
- if (tasks.size() == 1 && runningChildren.add(this)) {
- parent.execute(this);
- }
- }
- }
-
- public void run() {
- for (;;) {
- final Runnable task;
- synchronized(tasks) {
- task = tasks.poll();
- if (task == null) {
- runningChildren.remove(this);
- return;
- }
- }
- task.run();
- }
- }
- }
-}
Modified: remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicHandler.java
===================================================================
--- remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicHandler.java 2008-09-09 14:05:02 UTC (rev 4565)
+++ remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicHandler.java 2008-09-11 19:54:37 UTC (rev 4566)
@@ -83,9 +83,9 @@
private final ConcurrentIntegerMap<RequestHandler> remoteClients = concurrentIntegerMap();
// forwarded to remote side (handled on this side)
private final ConcurrentIntegerMap<Handle<RequestHandler>> forwardedClients = concurrentIntegerMap();
- // sequence for forwarded clients
+ // sequence for forwarded clients (unsigned; shift left one bit, add one)
private final AtomicInteger forwardedClientSequence = new AtomicInteger();
- // sequence for clients created from services forwarded to us
+ // sequence for clients created from services forwarded to us (unsigned; shift left one bit)
private final AtomicInteger remoteClientSequence = new AtomicInteger();
// services forwarded to us
Added: remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/OrderedExecutor.java
===================================================================
--- remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/OrderedExecutor.java (rev 0)
+++ remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/OrderedExecutor.java 2008-09-11 19:54:37 UTC (rev 4566)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.cx.remoting.util;
+
+import java.util.concurrent.Executor;
+import java.util.LinkedList;
+
+/**
+ * An executor that always runs all tasks in order, using a delegate executor to run the tasks.
+ * <p/>
+ * More specifically, any call B to the {@link #execute(Runnable)} method that happens-after another call A to the
+ * same method, will result in B's task running after A's.
+ */
+public final class OrderedExecutor implements Executor {
+ // @protectedby tasks
+ private final LinkedList<Runnable> tasks = new LinkedList<Runnable>();
+ // @protectedby tasks
+ private boolean running;
+ private final Executor parent;
+ private final Runnable runner;
+
+ /**
+ * Construct a new instance.
+ *
+ * @param parent the parent executor
+ */
+ public OrderedExecutor(final Executor parent) {
+ this.parent = parent;
+ runner = new Runnable() {
+ public void run() {
+ for (;;) {
+ final Runnable task;
+ synchronized(tasks) {
+ task = tasks.poll();
+ if (task == null) {
+ running = false;
+ return;
+ }
+ }
+ task.run();
+ }
+ }
+ };
+ }
+
+ /**
+ * Run a task.
+ *
+ * @param command the task to run.
+ */
+ public void execute(Runnable command) {
+ synchronized(tasks) {
+ tasks.add(command);
+ if (! running) {
+ running = true;
+ parent.execute(runner);
+ }
+ }
+ }
+}
Copied: remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/OrderedExecutorFactory.java (from rev 4514, remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/util/OrderedExecutorFactory.java)
===================================================================
--- remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/OrderedExecutorFactory.java (rev 0)
+++ remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/OrderedExecutorFactory.java 2008-09-11 19:54:37 UTC (rev 4566)
@@ -0,0 +1,28 @@
+package org.jboss.cx.remoting.util;
+
+import java.util.concurrent.Executor;
+
+/**
+ * A factory for producing executors that run all tasks in order, which delegate to a single common executor instance.
+ */
+public final class OrderedExecutorFactory {
+ private final Executor parent;
+
+ /**
+ * Construct a new instance delegating to the given parent executor.
+ *
+ * @param parent the parent executor
+ */
+ public OrderedExecutorFactory(final Executor parent) {
+ this.parent = parent;
+ }
+
+ /**
+ * Get an executor that always executes tasks in order.
+ *
+ * @return an ordered executor
+ */
+ public Executor getOrderedExecutor() {
+ return new OrderedExecutor(parent);
+ }
+}
16 years, 2 months
JBoss Remoting SVN: r4565 - in remoting3/trunk: api/src/main/java/org/jboss/cx/remoting and 8 other directories.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-09-09 10:05:02 -0400 (Tue, 09 Sep 2008)
New Revision: 4565
Added:
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/ReplyException.java
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/ConfigValue.java
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/RemotingChannelConfiguration.java
remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/ConcurrentIntegerMap.java
remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/EmulatedConcurrentIntegerHashMap.java
Removed:
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/marshal/
remoting3/trunk/api/src/test/java/org/jboss/cx/remoting/spi/marshal/
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/marshal/
Modified:
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/remote/ReplyHandler.java
remoting3/trunk/build.properties
remoting3/trunk/build.xml
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/stream/ObjectSourceStreamSerializerFactory.java
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicHandler.java
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicProtocol.java
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/MessageType.java
remoting3/trunk/protocol/basic/src/test/java/org/jboss/cx/remoting/protocol/basic/ConnectionTestCase.java
remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/CollectionUtil.java
Log:
Convert to new marshalling API
Added: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/ReplyException.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/ReplyException.java (rev 0)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/ReplyException.java 2008-09-09 14:05:02 UTC (rev 4565)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.cx.remoting;
+
+/**
+ *
+ */
+public class ReplyException extends RemotingException {
+
+ private static final long serialVersionUID = 5562116026829381932L;
+
+ public ReplyException() {
+ }
+
+ public ReplyException(final String msg) {
+ super(msg);
+ }
+
+ public ReplyException(final Throwable cause) {
+ super(cause);
+ }
+
+ public ReplyException(final String msg, final Throwable cause) {
+ super(msg, cause);
+ }
+}
Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/remote/ReplyHandler.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/remote/ReplyHandler.java 2008-09-09 08:55:28 UTC (rev 4564)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/remote/ReplyHandler.java 2008-09-09 14:05:02 UTC (rev 4565)
@@ -41,6 +41,7 @@
* @param msg the message
* @param cause the cause
*/
+ // TODO - change to accept a RemotingException instead?
void handleException(final String msg, Throwable cause);
/**
Modified: remoting3/trunk/build.properties
===================================================================
--- remoting3/trunk/build.properties 2008-09-09 08:55:28 UTC (rev 4564)
+++ remoting3/trunk/build.properties 2008-09-09 14:05:02 UTC (rev 4565)
@@ -115,6 +115,14 @@
lib.jboss-managed.local=${local.repository}/${lib.jboss-managed.local-path}
lib.jboss-managed.remote=${remote.repository}/${lib.jboss-managed.remote-path}
+lib.jboss-marshalling-api.version=1.0.0.Alpha.20080903-314
+lib.jboss-marshalling-api.name=marshalling-api.jar
+lib.jboss-marshalling-api.license=lgpl
+lib.jboss-marshalling-api.dir=jboss/marshalling/${lib.jboss-marshalling-api.version}/lib
+lib.jboss-marshalling-api.path=${lib.jboss-marshalling-api.dir}/${lib.jboss-marshalling-api.name}
+lib.jboss-marshalling-api.local=${local.repository}/${lib.jboss-marshalling-api.path}
+lib.jboss-marshalling-api.remote=${remote.repository}/${lib.jboss-marshalling-api.path}
+
lib.jboss-serialization.version=1.1.0-snapshot-r358
lib.jboss-serialization.name=jboss-serialization.jar
lib.jboss-serialization.license=lgpl
Modified: remoting3/trunk/build.xml
===================================================================
--- remoting3/trunk/build.xml 2008-09-09 08:55:28 UTC (rev 4564)
+++ remoting3/trunk/build.xml 2008-09-09 14:05:02 UTC (rev 4565)
@@ -127,6 +127,18 @@
<get src="${remote.license.dir}/${lib.jboss-managed.license}.txt" dest="${lib.jboss-managed.local}.license.txt" usetimestamp="true" ignoreerrors="false"/>
</target>
+ <!-- External library: JBoss Marshalling -->
+
+ <target name="lib.jboss-marshalling-api-check">
+ <available property="lib.jboss-marshalling-api.exists" file="${lib.jboss-marshalling-api.local}"/>
+ </target>
+
+ <target name="lib.jboss-marshalling-api" depends="lib.jboss-marshalling-api-check" unless="lib.jboss-marshalling-api.exists">
+ <mkdir dir="${local.repository}/${lib.jboss-marshalling-api.dir}"/>
+ <get src="${lib.jboss-marshalling-api.remote}" dest="${lib.jboss-marshalling-api.local}" usetimestamp="true" ignoreerrors="false"/>
+ <get src="${remote.license.dir}/${lib.jboss-marshalling-api.license}.txt" dest="${lib.jboss-marshalling-api.local}.license.txt" usetimestamp="true" ignoreerrors="false"/>
+ </target>
+
<!-- External library: JBoss Serialization -->
<target name="lib.jboss-serialization-check">
@@ -236,6 +248,7 @@
debug="true">
<compilerarg value="-Xlint:unchecked"/>
<classpath>
+ <pathelement location="${lib.jboss-marshalling-api.local}"/>
<pathelement location="${lib.xnio-api.local}"/>
<path refid="util.classpath"/>
</classpath>
@@ -267,6 +280,7 @@
<path refid="api.classpath"/>
<path refid="testing-support.classpath"/>
<pathelement location="${lib.junit.local}"/>
+ <pathelement location="${lib.jboss-marshalling-api.local}"/>
<pathelement location="${lib.xnio-api.local}"/>
</classpath>
</javac>
@@ -319,7 +333,7 @@
<delete dir="api/target"/>
</target>
- <target name="api" description="Build the API module" depends="lib.xnio-api,util,api.compile">
+ <target name="api" description="Build the API module" depends="lib.jboss-marshalling-api-check,lib.xnio-api,util,api.compile">
<path id="api.classpath">
<pathelement location="api/target/main/classes"/>
</path>
@@ -390,7 +404,7 @@
<path refid="api.classpath"/>
<path refid="util.classpath"/>
<path refid="version.classpath"/>
- <pathelement location="${lib.jboss-serialization.local}"/>
+ <pathelement location="${lib.jboss-marshalling-api.local}"/>
<pathelement location="${lib.xnio-api.local}"/>
</classpath>
</javac>
@@ -422,6 +436,7 @@
<path refid="core.classpath"/>
<path refid="util.classpath"/>
<path refid="testing-support.classpath"/>
+ <pathelement location="${lib.jboss-marshalling-api.local}"/>
<pathelement location="${lib.junit.local}"/>
<pathelement location="${lib.xnio-api.local}"/>
</classpath>
@@ -476,7 +491,7 @@
<delete dir="core/target"/>
</target>
- <target name="core" description="Build the core module" depends="lib.jboss-serialization,api,util,version,core.compile">
+ <target name="core" description="Build the core module" depends="api,util,version,core.compile">
<path id="core.classpath">
<pathelement location="core/target/main/classes"/>
</path>
@@ -743,6 +758,7 @@
<!-- TODO: marshallers should be moved to their own module -->
<path refid="core.classpath"/>
<path refid="util.classpath"/>
+ <pathelement location="${lib.jboss-marshalling-api.local}"/>
<pathelement location="${lib.xnio-api.local}"/>
</classpath>
</javac>
@@ -776,6 +792,7 @@
<path refid="util.classpath"/>
<path refid="testing-support.classpath"/>
<pathelement location="${lib.junit.local}"/>
+ <pathelement location="${lib.jboss-marshalling-api.local}"/>
<pathelement location="${lib.xnio-standalone.local}"/>
</classpath>
</javac>
@@ -802,6 +819,7 @@
<path refid="util.classpath"/>
<pathelement location="protocol/basic/target/test/classes"/>
<pathelement location="${lib.junit.local}"/>
+ <pathelement location="${lib.jboss-marshalling-api.local}"/>
<pathelement location="${lib.xnio-standalone.local}"/>
</classpath>
<batchtest fork="yes" todir="protocol/basic/target/test-results"
@@ -830,7 +848,7 @@
<delete dir="protocol.basic/target"/>
</target>
- <target name="protocol.basic" description="Build the protocol.basic module" depends="lib.xnio-api,api,core,util,protocol.basic.compile">
+ <target name="protocol.basic" description="Build the protocol.basic module" depends="lib.jboss-marshalling-api,lib.xnio-api,api,core,util,protocol.basic.compile">
<path id="protocol.basic.classpath">
<pathelement location="protocol/basic/target/main/classes"/>
</path>
Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/stream/ObjectSourceStreamSerializerFactory.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/stream/ObjectSourceStreamSerializerFactory.java 2008-09-09 08:55:28 UTC (rev 4564)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/stream/ObjectSourceStreamSerializerFactory.java 2008-09-09 14:05:02 UTC (rev 4565)
@@ -2,7 +2,6 @@
import java.io.IOException;
import org.jboss.cx.remoting.spi.stream.StreamSerializerFactory;
-import org.jboss.cx.remoting.spi.marshal.MarshallerFactory;
import org.jboss.cx.remoting.stream.ObjectSource;
import org.jboss.xnio.channels.StreamChannel;
import org.jboss.xnio.channels.StreamSourceChannel;
@@ -12,6 +11,7 @@
import org.jboss.xnio.ChannelSource;
import org.jboss.xnio.IoUtils;
import org.jboss.xnio.log.Logger;
+import org.jboss.marshalling.MarshallerFactory;
/**
*
Modified: remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicHandler.java
===================================================================
--- remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicHandler.java 2008-09-09 08:55:28 UTC (rev 4564)
+++ remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicHandler.java 2008-09-09 14:05:02 UTC (rev 4565)
@@ -27,43 +27,30 @@
import org.jboss.xnio.BufferAllocator;
import org.jboss.xnio.IoUtils;
import org.jboss.xnio.log.Logger;
-import static org.jboss.xnio.Buffers.*;
import org.jboss.cx.remoting.spi.remote.RequestHandler;
import org.jboss.cx.remoting.spi.remote.RequestHandlerSource;
import org.jboss.cx.remoting.spi.remote.ReplyHandler;
import org.jboss.cx.remoting.spi.remote.RemoteRequestContext;
import org.jboss.cx.remoting.spi.remote.Handle;
-import org.jboss.cx.remoting.spi.marshal.Unmarshaller;
-import org.jboss.cx.remoting.spi.marshal.Marshaller;
-import org.jboss.cx.remoting.spi.marshal.MarshallerFactory;
-import org.jboss.cx.remoting.spi.marshal.ObjectResolver;
-import org.jboss.cx.remoting.spi.marshal.IdentityResolver;
import org.jboss.cx.remoting.spi.SpiUtils;
import org.jboss.cx.remoting.spi.AbstractAutoCloseable;
-import static org.jboss.cx.remoting.util.CollectionUtil.concurrentMap;
-import static org.jboss.cx.remoting.util.CollectionUtil.arrayList;
+import static org.jboss.cx.remoting.util.CollectionUtil.concurrentIntegerMap;
import org.jboss.cx.remoting.util.CollectionUtil;
-import static org.jboss.cx.remoting.protocol.basic.MessageType.REQUEST_ONEWAY;
-import static org.jboss.cx.remoting.protocol.basic.MessageType.REQUEST;
-import static org.jboss.cx.remoting.protocol.basic.MessageType.REPLY;
-import static org.jboss.cx.remoting.protocol.basic.MessageType.CLIENT_CLOSE;
-import static org.jboss.cx.remoting.protocol.basic.MessageType.CLIENT_OPEN;
-import static org.jboss.cx.remoting.protocol.basic.MessageType.SERVICE_CLOSE;
-import static org.jboss.cx.remoting.protocol.basic.MessageType.REQUEST_FAILED;
-import static org.jboss.cx.remoting.protocol.basic.MessageType.CANCEL_ACK;
-import static org.jboss.cx.remoting.protocol.basic.MessageType.VERSION;
-import static org.jboss.cx.remoting.protocol.basic.MessageType.SERVICE_ADVERTISE;
-import static org.jboss.cx.remoting.protocol.basic.MessageType.SERVICE_UNADVERTISE;
+import org.jboss.cx.remoting.util.ConcurrentIntegerMap;
import org.jboss.cx.remoting.CloseHandler;
import org.jboss.cx.remoting.Endpoint;
-import java.util.concurrent.ConcurrentMap;
+import org.jboss.cx.remoting.SimpleCloseable;
+import org.jboss.marshalling.MarshallerFactory;
+import org.jboss.marshalling.ByteInput;
+import org.jboss.marshalling.Unmarshaller;
+import org.jboss.marshalling.ByteOutput;
+import org.jboss.marshalling.Marshaller;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicBoolean;
import java.util.List;
import java.util.ArrayList;
-import java.util.Collections;
+import java.util.Collection;
import java.nio.ByteBuffer;
import java.nio.BufferUnderflowException;
import java.io.IOException;
@@ -74,96 +61,67 @@
public final class BasicHandler implements IoHandler<AllocatedMessageChannel> {
private static final Logger log = Logger.getLogger(BasicHandler.class);
- private static final int LOCAL_VERSION = 0x00000100;
+ //--== Connection configuration items ==--
+ private final MarshallerFactory marshallerFactory;
+ private final int linkMetric;
+ private final Executor executor;
+ private final ClassLoader classLoader;
+ // buffer allocator for outbound message assembly
+ private final BufferAllocator<ByteBuffer> allocator;
+
// running on remote node
- private final ConcurrentMap<Integer, ReplyHandler> outstandingRequests = concurrentMap();
+ private final ConcurrentIntegerMap<ReplyHandler> remoteRequests = concurrentIntegerMap();
+ // running on local node
+ private final ConcurrentIntegerMap<RemoteRequestContext> localRequests = concurrentIntegerMap();
+ // sequence for remote requests
+ private final AtomicInteger requestSequence = new AtomicInteger();
// clients whose requests get forwarded to the remote side
- private final ConcurrentMap<Integer, RequestHandler> remoteClients = concurrentMap();
+ // even #s were opened from services forwarded to us (our sequence)
+ // odd #s were forwarded directly to us (remote sequence)
+ private final ConcurrentIntegerMap<RequestHandler> remoteClients = concurrentIntegerMap();
// forwarded to remote side (handled on this side)
- private final ConcurrentMap<Integer, Handle<RequestHandler>> forwardedClients = concurrentMap();
+ private final ConcurrentIntegerMap<Handle<RequestHandler>> forwardedClients = concurrentIntegerMap();
+ // sequence for forwarded clients
+ private final AtomicInteger forwardedClientSequence = new AtomicInteger();
+ // sequence for clients created from services forwarded to us
+ private final AtomicInteger remoteClientSequence = new AtomicInteger();
// services forwarded to us
- private final ConcurrentMap<Integer, RequestHandlerSource> remoteServices = concurrentMap();
+ private final ConcurrentIntegerMap<RequestHandlerSource> remoteServices = concurrentIntegerMap();
// forwarded to remote side (handled on this side)
- private final ConcurrentMap<Integer, Handle<RequestHandlerSource>> forwardedServices = concurrentMap();
+ private final ConcurrentIntegerMap<Handle<RequestHandlerSource>> forwardedServices = concurrentIntegerMap();
+ // sequence for forwarded services
+ private final AtomicInteger serviceSequence = new AtomicInteger();
- private final boolean server;
- private final BufferAllocator<ByteBuffer> allocator;
-
- private final AtomicBoolean isnew = new AtomicBoolean(true);
private volatile AllocatedMessageChannel channel;
- private volatile int remoteVersion;
- private final Executor executor;
- private final MarshallerFactory<ByteBuffer> marshallerFactory;
- private final ObjectResolver resolver;
- private final ClassLoader classLoader;
- private List<String> localMarshallerList = Collections.singletonList("java-serialization");
- private volatile String marshallerType;
- private volatile int metric;
- private final AtomicBoolean initialized = new AtomicBoolean(false);
- public BasicHandler(final boolean server, final BufferAllocator<ByteBuffer> allocator, final Executor executor, final MarshallerFactory<ByteBuffer> marshallerFactory) {
- this.server = server;
- this.allocator = allocator;
- this.executor = executor;
- final RequestHandlerImpl endpoint = new RequestHandlerImpl(0, allocator);
- remoteClients.put(Integer.valueOf(0), endpoint);
- this.marshallerFactory = marshallerFactory;
- // todo
- resolver = IdentityResolver.getInstance();
- classLoader = getClass().getClassLoader();
+ public BasicHandler(final RemotingChannelConfiguration configuration) {
+ allocator = configuration.getAllocator();
+ executor = configuration.getExecutor();
+ classLoader = configuration.getClassLoader();
+ marshallerFactory = configuration.getMarshallerFactory();
+ linkMetric = configuration.getLinkMetric();
}
- /**
- * Sequence number of requests originating locally.
- */
- private final AtomicInteger localRequestIdSeq = new AtomicInteger();
- /**
- * Sequence number of local clients forwarded to the remote side.
- */
- private final AtomicInteger localClientIdSeq = new AtomicInteger();
- /**
- * Sequence number of remote clients opened locally from services from the remote side.
- */
- private final AtomicInteger remoteClientIdSeq = new AtomicInteger();
-
public void handleOpened(final AllocatedMessageChannel channel) {
- if (isnew.getAndSet(false)) {
- this.channel = channel;
- }
- final List<ByteBuffer> bufferList = arrayList();
- ByteBuffer buffer = allocator.allocate();
- buffer.put((byte) VERSION);
- buffer.putInt(LOCAL_VERSION);
- String joinedList = CollectionUtil.join(",", localMarshallerList);
- for (;;) {
- int i = writeUTFZ(buffer, joinedList);
- if (i == -1) {
- break;
- }
- bufferList.add(flip(buffer));
- joinedList = joinedList.substring(i);
- buffer = allocator.allocate();
- }
- bufferList.add(flip(buffer));
- try {
- registerWriter(channel, new SimpleWriteHandler(allocator, bufferList));
- } catch (InterruptedException e) {
- log.error("Interrupted while sending intial version message");
- IoUtils.safeClose(channel);
- Thread.currentThread().interrupt();
- return;
- }
channel.resumeReads();
}
public void handleReadable(final AllocatedMessageChannel channel) {
for (;;) try {
- final ByteBuffer buffer = channel.receive();
+ final ByteBuffer buffer;
+ try {
+ buffer = channel.receive();
+ } catch (IOException e) {
+ log.error(e, "I/O error in protocol channel; closing channel");
+ IoUtils.safeClose(channel);
+ return;
+ }
if (buffer == null) {
// todo release all handles...
+ // todo what if the write queue is not empty?
IoUtils.safeClose(channel);
return;
}
@@ -172,145 +130,188 @@
channel.resumeReads();
return;
}
- int msgType = buffer.get() & 0xff;
- if (initialized.getAndSet(true) != (msgType != 0)) {
- log.error("Expected a version message; closing connection");
- IoUtils.safeClose(channel);
+ final MessageType msgType;
+ try {
+ msgType = MessageType.getMessageType(buffer.get() & 0xff);
+ } catch (IllegalArgumentException ex) {
+ log.trace("Received invalid message type");
return;
}
- log.trace("Received message %s, type %d", buffer, Integer.valueOf(msgType));
+ log.trace("Received message %s, type %s", buffer, msgType);
switch (msgType) {
- case VERSION: {
- // participants always choose the lowest version number
- // since we only support one version (0), we don't do anything with the value
- buffer.getInt();
- // Select the client's most preferred marshaling method that the server supports
- final String marshallerList = readUTFZ(buffer);
- final Iterable<String> remoteMarshallerList = CollectionUtil.split(",", marshallerList);
- final Iterable<String> clientList = server ? remoteMarshallerList : localMarshallerList;
- final Iterable<String> serverList = server ? localMarshallerList : remoteMarshallerList;
- for (final String clientSuggestion : clientList) {
- for (final String serverSuggestion : serverList) {
- if (clientSuggestion.equals(serverSuggestion)) {
- marshallerType = clientSuggestion;
- log.trace("Chose marshaller type '%s'", marshallerType);
- }
- }
- }
- if (marshallerType == null) {
- log.error("Could not agree on a marshaller type; closing connection");
- IoUtils.safeClose(channel);
- return;
- }
- break;
- }
case REQUEST_ONEWAY: {
final int clientId = buffer.getInt();
- final Handle<RequestHandler> handle = getForwardedClient(clientId);
+ final Handle<RequestHandler> handle = forwardedClients.get(clientId);
if (handle == null) {
log.trace("Request on invalid client ID %d", Integer.valueOf(clientId));
return;
}
- final Unmarshaller<ByteBuffer> unmarshaller = marshallerFactory.createUnmarshaller(resolver, classLoader);
- if (! unmarshaller.unmarshal(buffer)) {
- log.trace("Incomplete one-way request for client ID %d", Integer.valueOf(clientId));
- break;
- }
final Object payload;
try {
- payload = unmarshaller.get();
- } catch (ClassNotFoundException e) {
- log.trace("Class not found in one-way request for client ID %d", Integer.valueOf(clientId));
+ final Unmarshaller unmarshaller = marshallerFactory.createUnmarshaller();
+ try {
+ unmarshaller.start(createByteInput(buffer, true));
+ try {
+ payload = unmarshaller.readObject();
+ } catch (ClassNotFoundException e) {
+ log.trace("Class not found in one-way request for client ID %d", Integer.valueOf(clientId));
+ break;
+ }
+ } finally {
+ IoUtils.safeClose(unmarshaller);
+ }
+ } catch (IOException ex) {
+ log.error(ex, "Failed to unmarshal a one-way request");
break;
}
final RequestHandler requestHandler = handle.getResource();
- requestHandler.receiveRequest(payload);
+ try {
+ requestHandler.receiveRequest(payload);
+ } catch (Throwable t) {
+ log.error(t, "One-way request handler unexpectedly threw an exception");
+ }
break;
}
case REQUEST: {
final int clientId = buffer.getInt();
- final Handle<RequestHandler> handle = getForwardedClient(clientId);
+ final Handle<RequestHandler> handle = forwardedClients.get(clientId);
if (handle == null) {
log.trace("Request on invalid client ID %d", Integer.valueOf(clientId));
break;
}
final int requestId = buffer.getInt();
- final Unmarshaller<ByteBuffer> unmarshaller = marshallerFactory.createUnmarshaller(resolver, classLoader);
- if (! unmarshaller.unmarshal(buffer)) {
- log.trace("Incomplete request ID %d for client ID %d", Integer.valueOf(requestId), Integer.valueOf(clientId));
- new ReplyHandlerImpl(channel, requestId, allocator).handleException("Incomplete request", null);
- break;
- }
final Object payload;
try {
- payload = unmarshaller.get();
- } catch (ClassNotFoundException e) {
- log.trace("Class not found in request ID %d for client ID %d", Integer.valueOf(requestId), Integer.valueOf(clientId));
+ final Unmarshaller unmarshaller = marshallerFactory.createUnmarshaller();
+ try {
+ unmarshaller.start(createByteInput(buffer, true));
+ try {
+ payload = unmarshaller.readObject();
+ } catch (ClassNotFoundException e) {
+ log.trace("Class not found in request ID %d for client ID %d", Integer.valueOf(requestId), Integer.valueOf(clientId));
+ // todo - send request receive failed message
+ break;
+ }
+ } finally {
+ IoUtils.safeClose(unmarshaller);
+ }
+ } catch (IOException ex) {
+ log.trace("Failed to unmarshal a request (%s), sending %s", ex, MessageType.REQUEST_RECEIVE_FAILED);
+ // todo send a request failure message
break;
}
final RequestHandler requestHandler = handle.getResource();
- requestHandler.receiveRequest(payload, (ReplyHandler) new ReplyHandlerImpl(channel, requestId, allocator));
+ requestHandler.receiveRequest(payload, new ReplyHandlerImpl(channel, requestId, allocator));
break;
}
case REPLY: {
final int requestId = buffer.getInt();
- final ReplyHandler replyHandler = takeOutstandingReqeust(requestId);
+ final ReplyHandler replyHandler = remoteRequests.remove(requestId);
if (replyHandler == null) {
log.trace("Got reply to unknown request %d", Integer.valueOf(requestId));
break;
}
- final Unmarshaller<ByteBuffer> unmarshaller = marshallerFactory.createUnmarshaller(resolver, classLoader);
- if (! unmarshaller.unmarshal(buffer)) {
- replyHandler.handleException("Incomplete reply", null);
- log.trace("Incomplete reply to request ID %d", Integer.valueOf(requestId));
- break;
- }
final Object payload;
try {
- payload = unmarshaller.get();
- } catch (ClassNotFoundException e) {
- replyHandler.handleException("Reply unmarshalling failed", e);
- log.trace("Class not found in reply to request ID %d", Integer.valueOf(requestId));
+ final Unmarshaller unmarshaller = marshallerFactory.createUnmarshaller();
+ try {
+ unmarshaller.start(createByteInput(buffer, true));
+ try {
+ payload = unmarshaller.readObject();
+ } catch (ClassNotFoundException e) {
+ replyHandler.handleException("Reply unmarshalling failed", e);
+ log.trace("Class not found in reply to request ID %d", Integer.valueOf(requestId));
+ break;
+ }
+ } finally {
+ IoUtils.safeClose(unmarshaller);
+ }
+ } catch (IOException ex) {
+ log.trace("Failed to unmarshal a reply (%s), sending a ReplyException");
+ // todo
+ SpiUtils.safeHandleException(replyHandler, null, null);
break;
}
SpiUtils.safeHandleReply(replyHandler, payload);
break;
}
- case REQUEST_FAILED: {
+ case CANCEL_REQUEST: {
final int requestId = buffer.getInt();
- final ReplyHandler replyHandler = takeOutstandingReqeust(requestId);
+ final RemoteRequestContext context = localRequests.get(requestId);
+ if (context != null) {
+ context.cancel();
+ }
+ break;
+ }
+ case CANCEL_ACK: {
+ final int requestId = buffer.getInt();
+ final ReplyHandler replyHandler = remoteRequests.get(requestId);
+ if (replyHandler != null) {
+ replyHandler.handleCancellation();
+ }
+ break;
+ }
+ case REQUEST_RECEIVE_FAILED: {
+ final int requestId = buffer.getInt();
+ final ReplyHandler replyHandler = remoteRequests.remove(requestId);
if (replyHandler == null) {
log.trace("Got reply to unknown request %d", Integer.valueOf(requestId));
break;
}
- final Unmarshaller<ByteBuffer> unmarshaller = marshallerFactory.createUnmarshaller(resolver, classLoader);
- if (! unmarshaller.unmarshal(buffer)) {
- replyHandler.handleException("Incomplete exception reply", null);
- log.trace("Incomplete exception reply to request ID %d", Integer.valueOf(requestId));
+ final String reason = readUTFZ(buffer);
+ // todo - throw a new ReplyException
+ break;
+ }
+ case REQUEST_FAILED: {
+ final int requestId = buffer.getInt();
+ final ReplyHandler replyHandler = remoteRequests.remove(requestId);
+ if (replyHandler == null) {
+ log.trace("Got reply to unknown request %d", Integer.valueOf(requestId));
break;
}
- final Object message;
+ final Throwable cause;
try {
- message = unmarshaller.get();
- } catch (ClassNotFoundException e) {
- replyHandler.handleException("Exception reply unmarshalling failed", e);
- log.trace("Class not found in exception reply to request ID %d", Integer.valueOf(requestId));
+ final Unmarshaller unmarshaller = marshallerFactory.createUnmarshaller();
+ try {
+ unmarshaller.start(createByteInput(buffer, true));
+ try {
+ cause = (Throwable) unmarshaller.readObject();
+ } catch (ClassNotFoundException e) {
+ replyHandler.handleException("Exception reply unmarshalling failed", e);
+ log.trace("Class not found in exception reply to request ID %d", Integer.valueOf(requestId));
+ break;
+ } catch (ClassCastException e) {
+ // todo - report a generic exception
+ SpiUtils.safeHandleException(replyHandler, null, null);
+ break;
+ }
+ } finally {
+ IoUtils.safeClose(unmarshaller);
+ }
+ } catch (IOException ex) {
+ log.trace("Failed to unmarshal an exception reply (%s), sending a generic execution exception");
+ // todo
+ SpiUtils.safeHandleException(replyHandler, null, null);
break;
}
- final Object cause;
- try {
- cause = unmarshaller.get();
- } catch (ClassNotFoundException e) {
- replyHandler.handleException("Exception reply unmarshalling failed", e);
- log.trace("Class not found in exception reply to request ID %d", Integer.valueOf(requestId));
+ // todo - wrap with REE
+ SpiUtils.safeHandleException(replyHandler, null, cause);
+ break;
+ }
+ case REQUEST_OUTCOME_UNKNOWN: {
+ final int requestId = buffer.getInt();
+ final ReplyHandler replyHandler = remoteRequests.remove(requestId);
+ if (replyHandler == null) {
+ log.trace("Got reply to unknown request %d", Integer.valueOf(requestId));
break;
}
- SpiUtils.safeHandleException(replyHandler, message == null ? null : message.toString(), cause instanceof Throwable ? (Throwable) cause : null);
+ final String reason = readUTFZ(buffer);
+ // todo - throw a new IndetermOutcomeEx
break;
}
case CLIENT_CLOSE: {
final int clientId = buffer.getInt();
- final Handle<RequestHandler> handle = takeForwardedClient(clientId);
+ final Handle<RequestHandler> handle = forwardedClients.remove(clientId);
if (handle == null) {
log.warn("Got client close message for unknown client %d", Integer.valueOf(clientId));
break;
@@ -321,7 +322,7 @@
case CLIENT_OPEN: {
final int serviceId = buffer.getInt();
final int clientId = buffer.getInt();
- final Handle<RequestHandlerSource> handle = registry.lookup(serviceId);
+ final Handle<RequestHandlerSource> handle = forwardedServices.get(serviceId);
if (handle == null) {
log.warn("Received client open message for unknown service %d", Integer.valueOf(serviceId));
break;
@@ -332,14 +333,21 @@
// todo check for duplicate
// todo validate the client ID
log.trace("Opening client %d from service %d", Integer.valueOf(clientId), Integer.valueOf(serviceId));
- forwardedClients.put(Integer.valueOf(clientId), clientHandle);
+ forwardedClients.put(clientId, clientHandle);
+ } catch (IOException ex) {
+ log.error(ex, "Failed to create a request handler for client ID %d", Integer.valueOf(clientId));
+ break;
} finally {
IoUtils.safeClose(handle);
}
break;
}
case SERVICE_CLOSE: {
- registry.unbind(buffer.getInt());
+ final Handle<RequestHandlerSource> handle = forwardedServices.remove(buffer.getInt());
+ if (handle == null) {
+ break;
+ }
+ IoUtils.safeClose(handle);
break;
}
case SERVICE_ADVERTISE: {
@@ -348,37 +356,31 @@
final String groupName = readUTFZ(buffer);
final String endpointName = readUTFZ(buffer);
final int baseMetric = buffer.getInt();
- Endpoint endpoint;
- int id;
+ Endpoint endpoint = null;
+ int id = -1;
final RequestHandlerSource handlerSource = new RequestHandlerSourceImpl(allocator, id);
- final int calcMetric = baseMetric + metric;
+ final int calcMetric = baseMetric + linkMetric;
if (calcMetric > 0) {
- endpoint.registerRemoteService(serviceType, groupName, endpointName, handlerSource, calcMetric);
+ try {
+ final SimpleCloseable closeable = endpoint.registerRemoteService(serviceType, groupName, endpointName, handlerSource, calcMetric);
+ // todo - something with that closeable
+ } catch (IOException e) {
+ log.error(e, "Unable to register remote service");
+ }
}
break;
}
case SERVICE_UNADVERTISE: {
final int serviceId = buffer.getInt();
- IoUtils.safeClose(remoteServices.get(Integer.valueOf(serviceId)));
+ IoUtils.safeClose(remoteServices.get(serviceId));
break;
}
default: {
- log.trace("Received invalid message type %d", Integer.valueOf(msgType));
+ log.trace("Received invalid message type %s", msgType);
}
}
- } catch (IOException e) {
- log.error(e, "I/O error in protocol channel");
- IoUtils.safeClose(channel);
- return;
} catch (BufferUnderflowException e) {
log.error(e, "Malformed packet");
-// } catch (InterruptedException e) {
-// log.error(e, "Read thread interrupted, closing channel");
-// IoUtils.safeClose(channel);
-// Thread.currentThread().interrupt();
-// return;
- } catch (Throwable t) {
- log.error(t, "Handler failed");
}
}
@@ -407,10 +409,6 @@
public void handleClosed(final AllocatedMessageChannel channel) {
}
- RequestHandler getRemoteClient(final int i) {
- return remoteClients.get(Integer.valueOf(i));
- }
-
RequestHandlerSource getRemoteService(final int id) {
return new RequestHandlerSourceImpl(allocator, id);
}
@@ -435,56 +433,65 @@
public void handleReply(final Object reply) {
ByteBuffer buffer = allocator.allocate();
- buffer.put((byte) REPLY);
+ buffer.put((byte) MessageType.REPLY.getId());
buffer.putInt(requestId);
try {
- final Marshaller<ByteBuffer> marshaller = marshallerFactory.createMarshaller(resolver);
- marshaller.start(reply);
- final List<ByteBuffer> bufferList = new ArrayList<ByteBuffer>();
- while (! marshaller.marshal(buffer)) {
- bufferList.add(flip(buffer));
- buffer = allocator.allocate();
+ final org.jboss.marshalling.Marshaller marshaller = marshallerFactory.createMarshaller();
+ try {
+ final List<ByteBuffer> bufferList = new ArrayList<ByteBuffer>();
+ final ByteOutput output = createByteOutput(allocator, bufferList);
+ try {
+ marshaller.start(output);
+ marshaller.writeObject(reply);
+ marshaller.close();
+ output.close();
+ registerWriter(channel, new SimpleWriteHandler(allocator, bufferList));
+ } finally {
+ IoUtils.safeClose(output);
+ }
+ } finally {
+ IoUtils.safeClose(marshaller);
}
- bufferList.add(flip(buffer));
- registerWriter(channel, new SimpleWriteHandler(allocator, bufferList));
} catch (IOException e) {
- // todo log
+ log.error(e, "Failed to send a reply to the remote side");
} catch (InterruptedException e) {
- // todo log
+ log.error(e, "Reply handler thread interrupted before a reply could be sent");
Thread.currentThread().interrupt();
}
}
public void handleException(final String msg, final Throwable cause) {
ByteBuffer buffer = allocator.allocate();
- buffer.put((byte) REQUEST_FAILED);
+ buffer.put((byte) MessageType.REQUEST_FAILED.getId());
buffer.putInt(requestId);
try {
- final Marshaller<ByteBuffer> marshaller = marshallerFactory.createMarshaller(resolver);
- final List<ByteBuffer> bufferList = new ArrayList<ByteBuffer>();
- marshaller.start(msg);
- while (! marshaller.marshal(buffer)) {
- bufferList.add(flip(buffer));
- buffer = allocator.allocate();
+ final org.jboss.marshalling.Marshaller marshaller = marshallerFactory.createMarshaller();
+ try {
+ final List<ByteBuffer> bufferList = new ArrayList<ByteBuffer>();
+ final ByteOutput output = createByteOutput(allocator, bufferList);
+ try {
+ marshaller.start(output);
+ marshaller.writeObject(cause);
+ marshaller.close();
+ output.close();
+ registerWriter(channel, new SimpleWriteHandler(allocator, bufferList));
+ } finally {
+ IoUtils.safeClose(output);
+ }
+ } finally {
+ IoUtils.safeClose(marshaller);
}
- marshaller.start(cause);
- while (! marshaller.marshal(buffer)) {
- bufferList.add(flip(buffer));
- buffer = allocator.allocate();
- }
- bufferList.add(flip(buffer));
- registerWriter(channel, new SimpleWriteHandler(allocator, bufferList));
} catch (IOException e) {
- // todo log
+ log.error(e, "Failed to send an exception to the remote side");
} catch (InterruptedException e) {
- // todo log
+ log.error(e, "Reply handler thread interrupted before an exception could be sent");
Thread.currentThread().interrupt();
}
}
public void handleCancellation() {
final ByteBuffer buffer = allocator.allocate();
- buffer.put((byte) CANCEL_ACK);
+ buffer.put((byte) MessageType.CANCEL_ACK.getId());
buffer.putInt(requestId);
buffer.flip();
try {
@@ -496,45 +503,6 @@
}
}
- // Session mgmt
-
- public int openRequest(ReplyHandler handler) {
- int id;
- do {
- id = localRequestIdSeq.getAndIncrement();
- } while (outstandingRequests.putIfAbsent(Integer.valueOf(id), handler) != null);
- return id;
- }
-
- public int openClientFromService() {
- int id;
- do {
- id = remoteClientIdSeq.getAndIncrement() << 1 | (server ? 1 : 0);
- } while (remoteClients.putIfAbsent(Integer.valueOf(id), new RequestHandlerImpl(id, allocator)) != null);
- return id;
- }
-
- public void openClientForForwardedService(int id, RequestHandler clientEndpoint) {
- try {
- forwardedClients.put(Integer.valueOf(id), clientEndpoint.getHandle());
- } catch (IOException e) {
- // TODO fix
- e.printStackTrace();
- }
- }
-
- public Handle<RequestHandler> getForwardedClient(int id) {
- return forwardedClients.get(Integer.valueOf(id));
- }
-
- private Handle<RequestHandler> takeForwardedClient(final int id) {
- return forwardedClients.remove(Integer.valueOf(id));
- }
-
- public ReplyHandler takeOutstandingReqeust(int id) {
- return outstandingRequests.remove(Integer.valueOf(id));
- }
-
// Writer members
private final BlockingQueue<WriteHandler> outputQueue = CollectionUtil.blockingQueue(64);
@@ -655,8 +623,9 @@
this.allocator = allocator;
addCloseHandler(new CloseHandler<RequestHandler>() {
public void handleClose(final RequestHandler closed) {
+ remoteClients.remove(identifier, this);
ByteBuffer buffer = allocator.allocate();
- buffer.put((byte) MessageType.CLIENT_CLOSE);
+ buffer.put((byte) MessageType.CLIENT_CLOSE.getId());
buffer.putInt(identifier);
buffer.flip();
try {
@@ -671,17 +640,23 @@
public void receiveRequest(final Object request) {
log.trace("Sending outbound one-way request of type %s", request == null ? "null" : request.getClass());
try {
- final Marshaller<ByteBuffer> marshaller = marshallerFactory.createMarshaller(null);
- final List<ByteBuffer> bufferList = new ArrayList<ByteBuffer>();
- ByteBuffer buffer = allocator.allocate();
- buffer.put((byte) MessageType.REQUEST_ONEWAY);
- buffer.putInt(identifier);
- marshaller.start(request);
- while (! marshaller.marshal(buffer)) {
- bufferList.add(flip(buffer));
- buffer = allocator.allocate();
+ final List<ByteBuffer> bufferList;
+ final Marshaller marshaller = marshallerFactory.createMarshaller();
+ try {
+ bufferList = new ArrayList<ByteBuffer>();
+ final ByteOutput output = createByteOutput(allocator, bufferList);
+ try {
+ marshaller.write(MessageType.REQUEST_ONEWAY.getId());
+ marshaller.writeInt(identifier);
+ marshaller.writeObject(request);
+ marshaller.close();
+ output.close();
+ } finally {
+ IoUtils.safeClose(output);
+ }
+ } finally {
+ IoUtils.safeClose(marshaller);
}
- bufferList.add(flip(buffer));
try {
registerWriter(channel, new SimpleWriteHandler(allocator, bufferList));
} catch (InterruptedException e) {
@@ -699,33 +674,43 @@
public RemoteRequestContext receiveRequest(final Object request, final ReplyHandler handler) {
log.trace("Sending outbound request of type %s", request == null ? "null" : request.getClass());
try {
- final Marshaller<ByteBuffer> marshaller = marshallerFactory.createMarshaller(null);
- final List<ByteBuffer> bufferList = new ArrayList<ByteBuffer>();
- ByteBuffer buffer = allocator.allocate();
- buffer.put((byte) MessageType.REQUEST);
- buffer.putInt(identifier);
- final int id = openRequest(handler);
- buffer.putInt(id);
- marshaller.start(request);
- while (! marshaller.marshal(buffer)) {
- bufferList.add(flip(buffer));
- buffer = allocator.allocate();
- }
- bufferList.add(flip(buffer));
+ final List<ByteBuffer> bufferList;
+ final Marshaller marshaller = marshallerFactory.createMarshaller();
try {
- registerWriter(channel, new SimpleWriteHandler(allocator, bufferList));
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- executor.execute(new Runnable() {
- public void run() {
- SpiUtils.safeHandleCancellation(handler);
+ bufferList = new ArrayList<ByteBuffer>();
+ final ByteOutput output = createByteOutput(allocator, bufferList);
+ try {
+ marshaller.write(MessageType.REQUEST.getId());
+ marshaller.writeInt(identifier);
+
+ int id;
+ do {
+ id = requestSequence.getAndIncrement();
+ } while (remoteRequests.putIfAbsent(id, handler) != null);
+ marshaller.writeInt(id);
+ marshaller.writeObject(request);
+ marshaller.close();
+ output.close();
+ try {
+ registerWriter(channel, new SimpleWriteHandler(allocator, bufferList));
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ executor.execute(new Runnable() {
+ public void run() {
+ SpiUtils.safeHandleCancellation(handler);
+ }
+ });
+ return SpiUtils.getBlankRemoteRequestContext();
}
- });
- return SpiUtils.getBlankRemoteRequestContext();
+ log.trace("Sent request %s", request);
+ return new RemoteRequestContextImpl(id, allocator, channel);
+ } finally {
+ IoUtils.safeClose(output);
+ }
+ } finally {
+ IoUtils.safeClose(marshaller);
}
- log.trace("Sent request %s", request);
- return new RemoteRequestContextImpl(id, allocator, channel);
- } catch (final Throwable t) {
+ } catch (final IOException t) {
log.trace(t, "receiveRequest failed with an exception");
executor.execute(new Runnable() {
public void run() {
@@ -756,7 +741,7 @@
public void cancel() {
try {
final ByteBuffer buffer = allocator.allocate();
- buffer.put((byte) MessageType.CANCEL_REQUEST);
+ buffer.put((byte) MessageType.CANCEL_REQUEST.getId());
buffer.putInt(id);
buffer.flip();
registerWriter(channel, new SimpleWriteHandler(allocator, buffer));
@@ -781,7 +766,7 @@
addCloseHandler(new CloseHandler<RequestHandlerSource>() {
public void handleClose(final RequestHandlerSource closed) {
ByteBuffer buffer = allocator.allocate();
- buffer.put((byte) MessageType.SERVICE_CLOSE);
+ buffer.put((byte) MessageType.SERVICE_CLOSE.getId());
buffer.putInt(identifier);
buffer.flip();
try {
@@ -794,9 +779,13 @@
}
public Handle<RequestHandler> createRequestHandler() throws IOException {
- final int clientId = openClientFromService();
+ int id;
+ do {
+ id = remoteClientSequence.getAndIncrement() << 1;
+ } while (remoteClients.putIfAbsent(id, new RequestHandlerImpl(id, BasicHandler.this.allocator)) != null);
+ final int clientId = id;
final ByteBuffer buffer = allocator.allocate();
- buffer.put((byte) MessageType.CLIENT_OPEN);
+ buffer.put((byte) MessageType.CLIENT_OPEN.getId());
buffer.putInt(identifier);
buffer.putInt(clientId);
buffer.flip();
@@ -822,4 +811,105 @@
return "forwarding request handler source <" + Integer.toString(hashCode(), 16) + "> (id = " + identifier + ")";
}
}
+
+ public static ByteInput createByteInput(final ByteBuffer buffer, final boolean eof) {
+ return new ByteInput() {
+ public int read() throws IOException {
+ if (buffer.hasRemaining()) {
+ return buffer.get() & 0xff;
+ } else {
+ return eof ? -1 : 0;
+ }
+ }
+
+ public int read(final byte[] b) throws IOException {
+ return read(b, 0, b.length);
+ }
+
+ public int read(final byte[] b, final int off, final int len) throws IOException {
+ int r = Math.min(buffer.remaining(), len);
+ if (r > 0) {
+ buffer.get(b, off, r);
+ return r;
+ } else {
+ return eof ? -1 : 0;
+ }
+ }
+
+ public int available() throws IOException {
+ return buffer.remaining();
+ }
+
+ public long skip(final long n) throws IOException {
+ final int cnt = n > (long) Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) n;
+ int r = Math.min(buffer.remaining(), cnt);
+ if (r > 0) {
+ final int oldPos = buffer.position();
+ final int newPos = oldPos + r;
+ if (newPos < 0) {
+ final int lim = buffer.limit();
+ buffer.position(lim);
+ return lim - oldPos;
+ }
+ }
+ return r;
+ }
+
+ public void close() {
+ }
+ };
+ }
+
+ public static ByteOutput createByteOutput(final BufferAllocator<ByteBuffer> allocator, final Collection<ByteBuffer> target) {
+ return new ByteOutput() {
+ private ByteBuffer current;
+
+ private ByteBuffer getCurrent() {
+ final ByteBuffer buffer = current;
+ return buffer == null ? (current = allocator.allocate()) : buffer;
+ }
+
+ public void write(final int i) throws IOException {
+ final ByteBuffer buffer = getCurrent();
+ buffer.put((byte) i);
+ if (! buffer.hasRemaining()) {
+ buffer.flip();
+ target.add(buffer);
+ current = null;
+ }
+ }
+
+ public void write(final byte[] bytes) throws IOException {
+ write(bytes, 0, bytes.length);
+ }
+
+ public void write(final byte[] bytes, int offs, int len) throws IOException {
+ while (len > 0) {
+ final ByteBuffer buffer = getCurrent();
+ final int c = Math.min(len, buffer.remaining());
+ buffer.put(bytes, offs, c);
+ offs += c;
+ len -= c;
+ if (! buffer.hasRemaining()) {
+ buffer.flip();
+ target.add(buffer);
+ current = null;
+ }
+ }
+ }
+
+ public void close() throws IOException {
+ flush();
+ }
+
+ public void flush() throws IOException {
+ final ByteBuffer buffer = current;
+ if (buffer != null) {
+ buffer.flip();
+ target.add(buffer);
+ current = null;
+ }
+ }
+ };
+ }
}
Modified: remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicProtocol.java
===================================================================
--- remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicProtocol.java 2008-09-09 08:55:28 UTC (rev 4564)
+++ remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicProtocol.java 2008-09-09 14:05:02 UTC (rev 4565)
@@ -26,7 +26,6 @@
import org.jboss.cx.remoting.SimpleCloseable;
import org.jboss.cx.remoting.spi.remote.RequestHandlerSource;
import org.jboss.cx.remoting.spi.remote.Handle;
-import org.jboss.cx.remoting.core.marshal.JavaSerializationMarshallerFactory;
import org.jboss.xnio.IoHandlerFactory;
import org.jboss.xnio.ChannelSource;
import org.jboss.xnio.IoFuture;
@@ -59,7 +58,11 @@
public static IoHandlerFactory<AllocatedMessageChannel> createServer(final Executor executor, final BufferAllocator<ByteBuffer> allocator) {
return new IoHandlerFactory<AllocatedMessageChannel>() {
public IoHandler<? super AllocatedMessageChannel> createHandler() {
- return new BasicHandler(true, allocator, executor, new JavaSerializationMarshallerFactory(executor));
+ final RemotingChannelConfiguration configuration = new RemotingChannelConfiguration();
+ configuration.setAllocator(allocator);
+ configuration.setExecutor(executor);
+ // todo marshaller factory... etc
+ return new BasicHandler(configuration);
}
};
}
@@ -74,7 +77,11 @@
* @throws IOException if an error occurs
*/
public static IoFuture<SimpleCloseable> connect(final Executor executor, final ChannelSource<AllocatedMessageChannel> channelSource, final BufferAllocator<ByteBuffer> allocator) throws IOException {
- final BasicHandler basicHandler = new BasicHandler(false, allocator, executor, new JavaSerializationMarshallerFactory(executor));
+ final RemotingChannelConfiguration configuration = new RemotingChannelConfiguration();
+ configuration.setAllocator(allocator);
+ configuration.setExecutor(executor);
+ // todo marshaller factory... etc
+ final BasicHandler basicHandler = new BasicHandler(configuration);
final IoFuture<AllocatedMessageChannel> futureChannel = channelSource.open(basicHandler);
return new AbstractConvertingIoFuture<SimpleCloseable, AllocatedMessageChannel>(futureChannel) {
protected SimpleCloseable convert(final AllocatedMessageChannel channel) throws RemotingException {
Added: remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/ConfigValue.java
===================================================================
--- remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/ConfigValue.java (rev 0)
+++ remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/ConfigValue.java 2008-09-09 14:05:02 UTC (rev 4565)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.cx.remoting.protocol.basic;
+
+/**
+ *
+ */
+public enum ConfigValue {
+
+ /**
+ * The protocol version to use. Value type is {@code int}.
+ */
+ PROTOCOL_VERSION(0),
+ /**
+ * The name of the marshaller to use. Value type is {@code String}.
+ */
+ MARSHALLER_NAME(1),
+ ;
+ private final int id;
+
+ private ConfigValue(final int id) {
+ this.id = id;
+ }
+
+ /**
+ * Get the integer ID for this config value.
+ *
+ * @return the integer ID
+ */
+ public int getId() {
+ return id;
+ }
+
+ /**
+ * Get the config value for an integer ID.
+ *
+ * @param id the integer ID
+ * @return the config value instance
+ */
+ public static ConfigValue getConfigValue(final int id) {
+ switch (id) {
+ case 0: return PROTOCOL_VERSION;
+ case 1: return MARSHALLER_NAME;
+ default: throw new IllegalArgumentException("Invalid config value ID");
+ }
+ }
+}
Modified: remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/MessageType.java
===================================================================
--- remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/MessageType.java 2008-09-09 08:55:28 UTC (rev 4564)
+++ remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/MessageType.java 2008-09-09 14:05:02 UTC (rev 4565)
@@ -23,34 +23,69 @@
package org.jboss.cx.remoting.protocol.basic;
/**
- *
+ * The type of a protocol message.
*/
-public final class MessageType {
- // Initial version & marshaller negotiation
- public static final int VERSION = 0;
+public enum MessageType {
+
// One-way request, no return value may be sent
- public static final int REQUEST_ONEWAY = 1;
+ REQUEST_ONEWAY(1),
// Two-way request, return value is expected
- public static final int REQUEST = 2;
+ REQUEST(2),
// Reply
- public static final int REPLY = 3;
+ REPLY(3),
// Attempt to cancel a request
- public static final int CANCEL_REQUEST = 4;
+ CANCEL_REQUEST(4),
// Acknowledge that a request was cancelled
- public static final int CANCEL_ACK = 5;
+ CANCEL_ACK(5),
+ // Request failed due to protocol or unmarshalling problem
+ REQUEST_RECEIVE_FAILED(6),
// Request failed due to exception
- public static final int REQUEST_FAILED = 6;
+ REQUEST_FAILED(7),
+ // Request completed but no reply or exception was sent
+ REQUEST_OUTCOME_UNKNOWN(8),
// Remote side called .close() on a forwarded RequestHandler
- public static final int CLIENT_CLOSE = 7;
+ CLIENT_CLOSE(9),
// Remote side pulled a new RequestHandler off of a forwarded RequestHandlerSource
- public static final int CLIENT_OPEN = 8;
+ CLIENT_OPEN(10),
// Remote side called .close() on a forwarded RequestHandlerSource
- public static final int SERVICE_CLOSE = 9;
+ SERVICE_CLOSE(11),
// Remote side brought a new service online
- public static final int SERVICE_ADVERTISE = 10;
+ SERVICE_ADVERTISE(12),
// Remote side's service is no longer available
- public static final int SERVICE_UNADVERTISE= 11;
+ SERVICE_UNADVERTISE(13),
+ ;
+ private final int id;
- private MessageType() {
+ private MessageType(int id) {
+ this.id = id;
}
+
+ public int getId() {
+ return id;
+ }
+
+ /**
+ * Get the message type for an integer ID.
+ *
+ * @param id the integer ID
+ * @return the message type instance
+ */
+ public static MessageType getMessageType(final int id) {
+ switch (id) {
+ case 1: return REQUEST_ONEWAY;
+ case 2: return REQUEST;
+ case 3: return REPLY;
+ case 4: return CANCEL_REQUEST;
+ case 5: return CANCEL_ACK;
+ case 6: return REQUEST_RECEIVE_FAILED;
+ case 7: return REQUEST_FAILED;
+ case 8: return REQUEST_OUTCOME_UNKNOWN;
+ case 9: return CLIENT_CLOSE;
+ case 10: return CLIENT_OPEN;
+ case 11: return SERVICE_CLOSE;
+ case 12: return SERVICE_ADVERTISE;
+ case 13: return SERVICE_UNADVERTISE;
+ default: throw new IllegalArgumentException("Invalid message type ID");
+ }
+ }
}
Added: remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/RemotingChannelConfiguration.java
===================================================================
--- remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/RemotingChannelConfiguration.java (rev 0)
+++ remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/RemotingChannelConfiguration.java 2008-09-09 14:05:02 UTC (rev 4565)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.cx.remoting.protocol.basic;
+
+import java.util.concurrent.Executor;
+import java.nio.ByteBuffer;
+import org.jboss.xnio.BufferAllocator;
+import org.jboss.marshalling.MarshallerFactory;
+
+/**
+ *
+ */
+public final class RemotingChannelConfiguration {
+ private MarshallerFactory marshallerFactory;
+ private int linkMetric;
+ private Executor executor;
+ private ClassLoader classLoader;
+ private BufferAllocator<ByteBuffer> allocator;
+
+ public RemotingChannelConfiguration() {
+ }
+
+ public MarshallerFactory getMarshallerFactory() {
+ return marshallerFactory;
+ }
+
+ public void setMarshallerFactory(final MarshallerFactory marshallerFactory) {
+ this.marshallerFactory = marshallerFactory;
+ }
+
+ public int getLinkMetric() {
+ return linkMetric;
+ }
+
+ public void setLinkMetric(final int linkMetric) {
+ this.linkMetric = linkMetric;
+ }
+
+ public Executor getExecutor() {
+ return executor;
+ }
+
+ public void setExecutor(final Executor executor) {
+ this.executor = executor;
+ }
+
+ public ClassLoader getClassLoader() {
+ return classLoader;
+ }
+
+ public void setClassLoader(final ClassLoader classLoader) {
+ this.classLoader = classLoader;
+ }
+
+ public BufferAllocator<ByteBuffer> getAllocator() {
+ return allocator;
+ }
+
+ public void setAllocator(final BufferAllocator<ByteBuffer> allocator) {
+ this.allocator = allocator;
+ }
+}
Modified: remoting3/trunk/protocol/basic/src/test/java/org/jboss/cx/remoting/protocol/basic/ConnectionTestCase.java
===================================================================
--- remoting3/trunk/protocol/basic/src/test/java/org/jboss/cx/remoting/protocol/basic/ConnectionTestCase.java 2008-09-09 08:55:28 UTC (rev 4564)
+++ remoting3/trunk/protocol/basic/src/test/java/org/jboss/cx/remoting/protocol/basic/ConnectionTestCase.java 2008-09-09 14:05:02 UTC (rev 4565)
@@ -84,73 +84,6 @@
endpoint.setExecutor(closeableExecutor);
endpoint.start();
try {
- try {
- final Handle<RequestHandlerSource> requestHandlerSourceHandle = endpoint.createRequestHandlerSource(new AbstractRequestListener<Object, Object>() {
- public void handleRequest(final RequestContext<Object> context, final Object request) throws RemoteExecutionException {
- try {
- context.sendReply(REPLY);
- } catch (IOException e) {
- problems.add(e);
- }
- }
- }, null, null);
- try {
- serviceRegistry.bind(requestHandlerSourceHandle.getResource(), 13);
- final IoHandlerFactory<AllocatedMessageChannel> handlerFactory = BasicProtocol.createServer(closeableExecutor, allocator);
- final IoHandlerFactory<StreamChannel> newHandlerFactory = Channels.convertStreamToAllocatedMessage(handlerFactory, 32768, 32768);
- final Closeable tcpServerCloseable = xnio.createTcpServer(newHandlerFactory, new InetSocketAddress(12345)).create();
- try {
- final CloseableTcpConnector connector = xnio.createTcpConnector().create();
- try {
- final TcpClient tcpClient = connector.createChannelSource(new InetSocketAddress("localhost", 12345));
- final ChannelSource<AllocatedMessageChannel> channelSource = Channels.convertStreamToAllocatedMessage(tcpClient, 32768, 32768);
- final IoFuture<SimpleCloseable> futureCloseable = BasicProtocol.connect(closeableExecutor, channelSource, allocator);
- final SimpleCloseable connection = futureCloseable.get();
- try {
- final Handle<RequestHandlerSource> handleThirteen = connection.getServiceForId(13);
- try {
- final ClientSource<Object,Object> clientSource = endpoint.createClientSource(handleThirteen.getResource());
- try {
- final Client<Object,Object> client = clientSource.createClient();
- try {
- final IoFuture<Object> future = client.send(REQUEST);
- assertEquals(IoFuture.Status.DONE, future.await(TimeUnit.MILLISECONDS, 500L));
- assertEquals(REPLY, future.get());
- client.close();
- clientSource.close();
- handleThirteen.close();
- connection.close();
- connector.close();
- tcpServerCloseable.close();
- requestHandlerSourceHandle.close();
- serviceRegistry.clear();
- endpoint.stop();
- xnio.close();
- closeableExecutor.close();
- } finally {
- IoUtils.safeClose(client);
- }
- } finally {
- IoUtils.safeClose(clientSource);
- }
- } finally {
- IoUtils.safeClose(handleThirteen);
- }
- } finally {
- IoUtils.safeClose(connection);
- }
- } finally {
- IoUtils.safeClose(connector);
- }
- } finally {
- IoUtils.safeClose(tcpServerCloseable);
- }
- } finally {
- IoUtils.safeClose(requestHandlerSourceHandle);
- }
- } finally {
- serviceRegistry.clear();
- }
} finally {
endpoint.stop();
}
Modified: remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/CollectionUtil.java
===================================================================
--- remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/CollectionUtil.java 2008-09-09 08:55:28 UTC (rev 4564)
+++ remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/CollectionUtil.java 2008-09-09 14:05:02 UTC (rev 4565)
@@ -63,6 +63,10 @@
return new ConcurrentReferenceHashMap<K, V>(16, STRONG, WEAK);
}
+ public static <V> ConcurrentIntegerMap<V> concurrentIntegerMap() {
+ return new EmulatedConcurrentIntegerHashMap<V>(CollectionUtil.<Integer, V>concurrentMap());
+ }
+
/**
* Create a synchronized map that obeys the contract for {@code ConcurrentMap}.
*
Added: remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/ConcurrentIntegerMap.java
===================================================================
--- remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/ConcurrentIntegerMap.java (rev 0)
+++ remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/ConcurrentIntegerMap.java 2008-09-09 14:05:02 UTC (rev 4565)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.cx.remoting.util;
+
+import java.util.Set;
+import java.util.Collection;
+
+/**
+ *
+ */
+public interface ConcurrentIntegerMap<V> {
+ boolean containsKey(int key);
+
+ boolean containsValue(Object value);
+
+ V get(int key);
+
+ V put(int key, V value);
+
+ V putIfAbsent(int key, V value);
+
+ void putAll(ConcurrentIntegerMap<? extends V> m);
+
+ V remove(int key);
+
+ boolean remove(int key, Object oldValue);
+
+ V replace(int key, V value);
+
+ boolean replace(int key, V oldValue, V newValue);
+
+ void clear();
+
+ int size();
+
+ boolean isEmpty();
+
+ Set<Entry<V>> entrySet();
+
+ Collection<V> values();
+
+ boolean equals(Object other);
+
+ int hashCode();
+
+ interface Entry<V> {
+ int getKey();
+
+ V getValue();
+
+ V setValue(V value);
+
+ int hashCode();
+
+ boolean equals(Object other);
+ }
+}
Added: remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/EmulatedConcurrentIntegerHashMap.java
===================================================================
--- remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/EmulatedConcurrentIntegerHashMap.java (rev 0)
+++ remoting3/trunk/util/src/main/java/org/jboss/cx/remoting/util/EmulatedConcurrentIntegerHashMap.java 2008-09-09 14:05:02 UTC (rev 4565)
@@ -0,0 +1,197 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.cx.remoting.util;
+
+import java.util.Set;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Iterator;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ *
+ */
+public final class EmulatedConcurrentIntegerHashMap<V> implements ConcurrentIntegerMap<V> {
+
+ private final ConcurrentMap<Integer, V> delegate;
+
+ public EmulatedConcurrentIntegerHashMap(final ConcurrentMap<Integer, V> delegate) {
+ this.delegate = delegate;
+ }
+
+ public boolean containsKey(final int key) {
+ return delegate.containsKey(Integer.valueOf(key));
+ }
+
+ public boolean containsValue(final Object value) {
+ return delegate.containsValue(value);
+ }
+
+ public V get(final int key) {
+ return delegate.get(Integer.valueOf(key));
+ }
+
+ public V put(final int key, final V value) {
+ return delegate.put(Integer.valueOf(key), value);
+ }
+
+ public V putIfAbsent(final int key, final V value) {
+ return delegate.putIfAbsent(Integer.valueOf(key), value);
+ }
+
+ public void putAll(final ConcurrentIntegerMap<? extends V> m) {
+ throw new UnsupportedOperationException("maybe later");
+ }
+
+ public V remove(final int key) {
+ return delegate.remove(Integer.valueOf(key));
+ }
+
+ public boolean remove(final int key, final Object oldValue) {
+ return delegate.remove(Integer.valueOf(key), oldValue);
+ }
+
+ public V replace(final int key, final V value) {
+ return delegate.replace(Integer.valueOf(key), value);
+ }
+
+ public boolean replace(final int key, final V oldValue, final V newValue) {
+ return delegate.replace(Integer.valueOf(key), oldValue, newValue);
+ }
+
+ public void clear() {
+ delegate.clear();
+ }
+
+ public int size() {
+ return delegate.size();
+ }
+
+ public boolean isEmpty() {
+ return delegate.isEmpty();
+ }
+
+ public Set<Entry<V>> entrySet() {
+ return new EmulatedEntrySet<V>(delegate.entrySet());
+ }
+
+ public Collection<V> values() {
+ return delegate.values();
+ }
+
+ public boolean equals(final Object obj) {
+ return super.equals(obj);
+ }
+
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ private static class EmulatedEntrySet<V> implements Set<Entry<V>> {
+
+ private final Set<Map.Entry<Integer, V>> delegate;
+
+ public EmulatedEntrySet(final Set<Map.Entry<Integer,V>> delegate) {
+ this.delegate = delegate;
+ }
+
+ public int size() {
+ return delegate.size();
+ }
+
+ public boolean isEmpty() {
+ return delegate.isEmpty();
+ }
+
+ public boolean contains(final Object o) {
+ // todo
+ return false;
+ }
+
+ public Iterator<Entry<V>> iterator() {
+ final Iterator<Map.Entry<Integer, V>> i = delegate.iterator();
+ return new Iterator<Entry<V>>() {
+ public boolean hasNext() {
+ return i.hasNext();
+ }
+
+ public Entry<V> next() {
+ final Map.Entry<Integer, V> n = i.next();
+ return new Entry<V>() {
+ public int getKey() {
+ return n.getKey().intValue();
+ }
+
+ public V getValue() {
+ return n.getValue();
+ }
+
+ public V setValue(final V value) {
+ return n.setValue(value);
+ }
+ };
+ }
+
+ public void remove() {
+ i.remove();
+ }
+ };
+ }
+
+ public Object[] toArray() {
+ throw new UnsupportedOperationException("maybe later");
+ }
+
+ public <T> T[] toArray(final T[] a) {
+ throw new UnsupportedOperationException("maybe later");
+ }
+
+ public boolean add(final Entry<V> o) {
+ throw new UnsupportedOperationException("add() not supported");
+ }
+
+ public boolean remove(final Object o) {
+ throw new UnsupportedOperationException("maybe later");
+ }
+
+ public boolean containsAll(final Collection<?> c) {
+ throw new UnsupportedOperationException("maybe later");
+ }
+
+ public boolean addAll(final Collection<? extends Entry<V>> c) {
+ throw new UnsupportedOperationException("addAll() not supported");
+ }
+
+ public boolean retainAll(final Collection<?> c) {
+ throw new UnsupportedOperationException("maybe later");
+ }
+
+ public boolean removeAll(final Collection<?> c) {
+ throw new UnsupportedOperationException("maybe later");
+ }
+
+ public void clear() {
+ delegate.clear();
+ }
+ }
+}
16 years, 2 months
JBoss Remoting SVN: r4564 - remoting2/tags.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-09-09 04:55:28 -0400 (Tue, 09 Sep 2008)
New Revision: 4564
Added:
remoting2/tags/2.5.0.GA/
Log:
Copied: remoting2/tags/2.5.0.GA (from rev 4563, remoting2/branches/2.x)
16 years, 2 months
JBoss Remoting SVN: r4563 - remoting2/branches/2.x/docs/guide/en.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-09-09 03:33:45 -0400 (Tue, 09 Sep 2008)
New Revision: 4563
Modified:
remoting2/branches/2.x/docs/guide/en/chap17.xml
Log:
JBREM-1030: Added description and release notes for 2.5.0.GA.
Modified: remoting2/branches/2.x/docs/guide/en/chap17.xml
===================================================================
--- remoting2/branches/2.x/docs/guide/en/chap17.xml 2008-09-09 07:22:57 UTC (rev 4562)
+++ remoting2/branches/2.x/docs/guide/en/chap17.xml 2008-09-09 07:33:45 UTC (rev 4563)
@@ -3,6 +3,23 @@
<title>Release Notes</title>
<section>
+ <title>Important changes and differences in 2.5.0 release (from 2.4.0
+ release)</title>
+
+ <para>Version 2.5.0 represents the process of upgrading the jars with
+ which Remoting is tested and shipped. In particular, the jars are now
+ equivalent to the jars found in the JBoss Application Server version
+ 5.0.0.CR2 (as of 9/6/08, before its release). Changes to jbossweb (the JBoss
+ version of Tomcat) have necessitated dropping the use of Apache Tomcat,
+ which means that the "http" transport will no longer function with jdk 1.4.</para>
+
+ <para>Other features of Remoting 2.5.0.GA should function with jdk 1.4.
+ However, it is the policy of JBoss, a division of Red Hat, no longer to
+ support jdk 1.4.</para>
+
+ </section>
+
+ <section>
<title>Important changes and differences in 2.4.0 release (from 2.2.0
release)</title>
@@ -50,6 +67,32 @@
<section>
<title>Release history</title>
+ <section>
+ <title>Version 2.5</title>
+
+ <bridgehead>Release Notes - JBoss Remoting - Version 2.5.0 (Flounder)</bridgehead>
+
+ <para><emphasis role="bold">Bug</emphasis></para>
+
+ <para>* [JBREM-1027] - CoyoteInvoker should pass URL query in InvocationRequest</para>
+ <para>* [JBREM-1028] - JavaSerializationManager should clear ObjectOutputStream internal tables</para>
+
+ <para><emphasis role="bold">Release</emphasis></para>
+
+ <para>* [JBREM-1030] - Release 2.5.0.GA</para>
+
+ <para><emphasis role="bold">Task</emphasis></para>
+
+ <para>* [JBREM-1029] - Assure version compatibility with earlier versions of Remoting</para>
+ <para>* [JBREM-1033] - Upgrade jars to versions in JBossAS 5.0.0.CR2</para>
+ <para>* [JBREM-1034] - Assure version compatibility with earlier versions of Remoting</para>
+
+ <para><emphasis role="bold">Sub-task</emphasis></para>
+
+ <para>* [JBREM-1032] - Upgrade to the latest jboss-common-core 2.2.8.GA</para>
+
+ </section>
+
<section>
<title>Version 2.4</title>
16 years, 2 months
JBoss Remoting SVN: r4562 - remoting2/branches/2.x/docs/guide/en.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-09-09 03:22:57 -0400 (Tue, 09 Sep 2008)
New Revision: 4562
Modified:
remoting2/branches/2.x/docs/guide/en/chap1.xml
Log:
JBREM-1030: Added description of 2.5.0.GA.
Modified: remoting2/branches/2.x/docs/guide/en/chap1.xml
===================================================================
--- remoting2/branches/2.x/docs/guide/en/chap1.xml 2008-09-09 07:22:34 UTC (rev 4561)
+++ remoting2/branches/2.x/docs/guide/en/chap1.xml 2008-09-09 07:22:57 UTC (rev 4562)
@@ -173,7 +173,22 @@
distribution includes binaries, source, documentation, javadoc, and sample
code.</para>
</section>
+
+ <section>
+ <title>What's new in version 2.5?</title>
+
+ <para>Version 2.5.0 represents the process of upgrading the jars with
+ which Remoting is tested and shipped. In particular, the jars are now
+ equivalent to the jars found in the JBoss Application Server version
+ 5.0.0.CR2 (as of 9/6/08, before its release). Changes to jbossweb (the JBoss
+ version of Tomcat) have necessitated dropping the use of Apache Tomcat,
+ which means that the "http" transport will no longer function with jdk 1.4.</para>
+ <para>Other features of Remoting 2.5.0.GA should function with jdk 1.4.
+ However, it is the policy of JBoss, a division of Red Hat, no longer to
+ support jdk 1.4.</para>
+ </section>
+
<section>
<title>What's new in version 2.4?</title>
16 years, 2 months
JBoss Remoting SVN: r4561 - remoting2/branches/2.x/docs/guide/en.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-09-09 03:22:34 -0400 (Tue, 09 Sep 2008)
New Revision: 4561
Modified:
remoting2/branches/2.x/docs/guide/en/master.xml
Log:
JBREM-1030: Added description of 2.5.0.GA.
Modified: remoting2/branches/2.x/docs/guide/en/master.xml
===================================================================
--- remoting2/branches/2.x/docs/guide/en/master.xml 2008-09-09 07:13:45 UTC (rev 4560)
+++ remoting2/branches/2.x/docs/guide/en/master.xml 2008-09-09 07:22:34 UTC (rev 4561)
@@ -24,9 +24,9 @@
<bookinfo>
<title>JBoss Remoting Guide</title>
- <subtitle>JBoss Remoting version 2.4.0.SP2</subtitle>
+ <subtitle>JBoss Remoting version 2.5.0.GA</subtitle>
- <releaseinfo>August 30, 2008</releaseinfo>
+ <releaseinfo>September 9, 2008</releaseinfo>
<mediaobject>
<imageobject>
16 years, 2 months
JBoss Remoting SVN: r4560 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-09-09 03:13:45 -0400 (Tue, 09 Sep 2008)
New Revision: 4560
Modified:
remoting2/branches/2.x/build.xml
Log:
JBREM-1033: Updated to run versioning tests with older jars; JBREM-1030: Updated version to 2.5.0.GA.
Modified: remoting2/branches/2.x/build.xml
===================================================================
--- remoting2/branches/2.x/build.xml 2008-09-09 07:11:11 UTC (rev 4559)
+++ remoting2/branches/2.x/build.xml 2008-09-09 07:13:45 UTC (rev 4560)
@@ -224,9 +224,9 @@
<!-- Module name(s) & version -->
<property name="module.name" value="remoting"/>
<property name="module.Name" value="JBoss Remoting"/>
- <property name="module.version" value="2.4.0.SP2"/>
+ <property name="module.version" value="2.5.0.GA"/>
<!-- extension is for the file suffix to use for dtribution build -->
- <property name="module.version.extension" value="2_4_0_SP2"/>
+ <property name="module.version.extension" value="2_5_0_GA"/>
<property name="implementation.url" value="http://www.jboss.org/products/remoting"/>
<property name="root.dir" value="${basedir}"/>
@@ -275,19 +275,19 @@
<!--exclude name="apache-tomcat/*.jar" unless="isJDK4"/-->
<exclude name="**/jdk14/*.jar" unless="isJDK4"/>
<include name="**/jdk14/*.jar" if="isJDK4"/>
- <exclude name="apache-log4j/lib/log4j.jar" if="isJDK4"/>
- <exclude name="jboss/jboss-j2se.jar" if="isJDK4"/>
- <exclude name="jboss/jboss-common-core.jar" if="isJDK4"/>
- <exclude name="jboss/jboss-jmx.jar" if="isJDK4"/>
- <exclude name="jboss/jboss-logging-log4j.jar" if="isJDK4"/>
- <exclude name="jboss/jboss-logging-spi.jar" if="isJDK4"/>
+ <exclude name="apache-log4j/lib/log4j.jar" if="isJDK4"/>
+ <exclude name="jboss/jboss-j2se.jar" if="isJDK4"/>
+ <exclude name="jboss/jboss-common-core.jar" if="isJDK4"/>
+ <exclude name="jboss/jboss-jmx.jar" if="isJDK4"/>
+ <exclude name="jboss/jboss-logging-log4j.jar" if="isJDK4"/>
+ <exclude name="jboss/jboss-logging-spi.jar" if="isJDK4"/>
<exclude name="jboss/jnpserver.jar" if="isJDK4"/>
<exclude name="jbossweb/*.jar" if="isJDK4"/>
<exclude name="oswego-concurrent/lib/concurrent.jar" if="isJDK4"/>
- <exclude name="sun-servlet/lib/servlet-api.ja" if="isJDK4"/>
+ <exclude name="sun-servlet/lib/servlet-api.ja" if="isJDK4"/>
</fileset>
</path>
-
+
<!-- The combined library classpath -->
<path id="library.classpath">
<pathelement path="${output.lib.dir}/jboss-remoting.jar"/>
@@ -414,7 +414,7 @@
optimize="off"
includes="**/*.java"
failonerror="true"
- sourcepath="">
+ sourcepath="">
<src path="${src.dir}"/>
<include name="**/*.java"/>
<exclude name="org/jboss/remoting/transport/coyote/**" if="isJDK4"/>
@@ -505,7 +505,7 @@
optimize="off"
includes="**/*.java"
failonerror="true"
- sourcepath="">
+ sourcepath="">
<src path="${tests.src.dir}"/>
<include name="**/*.java"/>
<exclude name="org/jboss/test/remoting/**/http/**" if="isJDK4"/>
@@ -1670,17 +1670,54 @@
<!--</antcall>-->
</target>
+ <target name="configure.versioning">
+
+ <path id="basic.third_party.classpath">
+ <fileset dir="${lib.dir}">
+ <include name="**/*.jar"/>
+ <exclude name="**/jdk14/*.jar"/>
+ <exclude name="jboss/jboss-j2se.jar"/>
+ <exclude name="jboss/jboss-common-core.jar"/>
+ <exclude name="jboss/jboss-jmx.jar"/>
+ <exclude name="jboss/jboss-logging-log4j.jar"/>
+ <exclude name="jboss/jboss-logging-spi.jar"/>
+ <exclude name="jboss/jnpserver.jar"/>
+ <exclude name="sun-servlet/lib/servlet-api.jar"/>
+ </fileset>
+ </path>
+
+ <!-- Versioning classpath for versions 2.5.0.GA and beyond -->
+ <property name="jboss.dir" value="${lib.dir}${file.separator}jboss${file.separator}"/>
+ <property name="ec1" value="${jboss.dir}jboss-j2se.jar${path.separator}"/>
+ <property name="ec2" value="${jboss.dir}jboss-common-core.jar${path.separator}"/>
+ <property name="ec3" value="${jboss.dir}jboss-jmx.jar${path.separator}"/>
+ <property name="ec4" value="${jboss.dir}jboss-logging-log4j.jar${path.separator}"/>
+ <property name="ec5" value="${jboss.dir}jboss-logging-spi.jar${path.separator}"/>
+ <property name="ec6" value="${jboss.dir}jnpserver.jar${path.separator}"/>
+ <property name="ec7" value="${lib.dir}${file.separator}sun-servlet${file.separator}lib${file.separator}servlet-api.jar"/>
+ <property name="extended.classpath" value="${path.separator}${ec1}${ec2}${ec3}${ec4}${ec5}${ec6}${ec7}"/>
+
+ <!-- Versioning classpath for versions prior to 2.5.0.GA -->
+ <property name="jdk14.dir" value="${lib.dir}${file.separator}jdk14${file.separator}"/>
+ <property name="oec1" value="${jdk14.dir}jboss-common.jar${path.separator}"/>
+ <property name="oec2" value="${jdk14.dir}jboss-jmx.jar${path.separator}"/>
+ <property name="oec3" value="${jdk14.dir}jnpserver.jar${path.separator}"/>
+ <property name="oec4" value="${jdk14.dir}servlet-api.jar"/>
+ <property name="old.extended.classpath" value="${path.separator}${oec1}${oec2}${oec3}${oec4}"/>
+
+ </target>
+
<!-- This runs all the versioning tests -->
<target name="tests.versioning.all"
description="Runs remoting fuctional tests with different remoting versions for client and server."
- depends="jars, tests.jars">
-
+ depends="tests.jars,configure.versioning">
+
<!-- ******************************************************************************** -->
<!-- Current <- -> Current -->
<antcall target="tests.versioning.all_transports" inheritrefs="true">
<param name="jboss-junit-configuration" value="${module.version.extension}"/>
- <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
- <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="check_content_type" value="true"/>
</antcall>
@@ -1688,23 +1725,47 @@
<!-- Current <- -> 2.4.0.GA -->
<antcall target="tests.versioning.all_transports" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_4_0_GA-client"/>
- <param name="client.classpath" value="${etc.dir}/lib/remoting_2_4_0_GA/jboss-remoting.jar"/>
- <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_2_4_0_GA/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="check_content_type" value="true"/>
</antcall>
<antcall target="tests.versioning.all_transports" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_4_0_GA-server"/>
- <param name="server.classpath" value="${etc.dir}/lib/remoting_2_4_0_GA/jboss-remoting.jar"/>
- <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_2_4_0_GA/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="check_content_type" value="true"/>
</antcall>
-
+
<!-- ******************************************************************************** -->
+ <!-- Current <- -> 2.2.2.SP9 -->
+ <antcall target="tests.versioning.all_transports_pre_2.4" inheritrefs="true">
+ <param name="jboss-junit-configuration" value="2_2_2_SP9-client"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP9/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
+ <param name="client.pre_2_0_compatible" value=""/>
+ <param name="server.pre_2_0_compatible" value=""/>
+ <param name="client.version" value=""/>
+ <param name="server.version" value="2"/>
+ <param name="check_connection" value="false"/>
+ </antcall>
+ <antcall target="tests.versioning.all_transports_pre_2.4" inheritrefs="true">
+ <param name="jboss-junit-configuration" value="2_2_2_SP9-server"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP9/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
+ <param name="client.pre_2_0_compatible" value=""/>
+ <param name="server.pre_2_0_compatible" value=""/>
+ <param name="client.version" value="2"/>
+ <param name="server.version" value=""/>
+ <param name="check_connection" value="false"/>
+ <param name="check_content_type" value="true"/>
+ </antcall>
+
+ <!-- ******************************************************************************** -->
<!-- Current <- -> 2.2.2.SP7 -->
<antcall target="tests.versioning.all_transports_pre_2.4" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_2_2_SP7-client"/>
- <param name="client.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP7/jboss-remoting.jar"/>
- <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP7/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value=""/>
@@ -1713,8 +1774,8 @@
</antcall>
<antcall target="tests.versioning.all_transports_pre_2.4" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_2_2_SP7-server"/>
- <param name="server.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP7/jboss-remoting.jar"/>
- <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP7/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value="2"/>
@@ -1727,8 +1788,8 @@
<!-- Current <- -> 2.2.2.SP4 -->
<antcall target="tests.versioning.all_transports_pre_2.4" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_2_2_SP4-client"/>
- <param name="client.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP4/jboss-remoting.jar"/>
- <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP4/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value=""/>
@@ -1737,8 +1798,8 @@
</antcall>
<antcall target="tests.versioning.all_transports_pre_2.4" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_2_2_SP4-server"/>
- <param name="server.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP4/jboss-remoting.jar"/>
- <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP4/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value="2"/>
@@ -1751,8 +1812,8 @@
<!-- Current <- -> 2.2.2.SP2 -->
<antcall target="tests.versioning.all_transports_pre_2.4" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_2_2_SP2-client"/>
- <param name="client.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP2/jboss-remoting.jar"/>
- <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP2/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value=""/>
@@ -1761,8 +1822,8 @@
</antcall>
<antcall target="tests.versioning.all_transports_pre_2.4" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_2_2_SP2-server"/>
- <param name="server.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP2/jboss-remoting.jar"/>
- <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP2/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value="2"/>
@@ -1775,8 +1836,8 @@
<!-- Current <- -> 2.2.2.SP1 -->
<antcall target="tests.versioning.all_transports_pre_2.4" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_2_2_SP1-client"/>
- <param name="client.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP1/jboss-remoting.jar"/>
- <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP1/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value=""/>
@@ -1785,8 +1846,8 @@
</antcall>
<antcall target="tests.versioning.all_transports_pre_2.4" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_2_2_SP1-server"/>
- <param name="server.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP1/jboss-remoting.jar"/>
- <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_2_2_2_SP1/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value="2"/>
@@ -1799,8 +1860,8 @@
<!-- Current <- -> 2.2.2.GA -->
<antcall target="tests.versioning.all_transports_pre_2.4" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_2_2_GA-client"/>
- <param name="client.classpath" value="${etc.dir}/lib/remoting_2_2_2_GA/jboss-remoting.jar"/>
- <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_2_2_2_GA/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value=""/>
@@ -1809,8 +1870,8 @@
</antcall>
<antcall target="tests.versioning.all_transports_pre_2.4" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_2_2_GA-server"/>
- <param name="server.classpath" value="${etc.dir}/lib/remoting_2_2_2_GA/jboss-remoting.jar"/>
- <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_2_2_2_GA/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value="2"/>
@@ -1823,8 +1884,8 @@
<!-- Current <- -> 2.2.1.GA -->
<antcall target="tests.versioning.all_transports_but_bisocket" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_2_1_GA-client"/>
- <param name="client.classpath" value="${etc.dir}/lib/remoting_2_2_1_GA/jboss-remoting.jar"/>
- <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_2_2_1_GA/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value=""/>
@@ -1833,8 +1894,8 @@
</antcall>
<antcall target="tests.versioning.all_transports_but_bisocket" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_2_1_GA-server"/>
- <param name="server.classpath" value="${etc.dir}/lib/remoting_2_2_1_GA/jboss-remoting.jar"/>
- <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_2_2_1_GA/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value="2"/>
@@ -1847,8 +1908,8 @@
<!-- Current <- -> 2.2.0.SP4 -->
<antcall target="tests.versioning.all_transports_but_bisocket" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_2_0_SP4-client"/>
- <param name="client.classpath" value="${etc.dir}/lib/remoting_2_2_0_SP4/jboss-remoting.jar"/>
- <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_2_2_0_SP4/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value=""/>
@@ -1857,8 +1918,8 @@
</antcall>
<antcall target="tests.versioning.all_transports_but_bisocket" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_2_0_SP4-server"/>
- <param name="server.classpath" value="${etc.dir}/lib/remoting_2_2_0_SP4/jboss-remoting.jar"/>
- <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_2_2_0_SP4/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value="2"/>
@@ -1871,8 +1932,8 @@
<!-- Current <- -> 2.0.0.GA -->
<antcall target="tests.versioning.all_transports_but_bisocket" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_0_0_GA-client"/>
- <param name="client.classpath" value="${etc.dir}/lib/remoting_2_0_0_GA/jboss-remoting.jar"/>
- <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_2_0_0_GA/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value=""/>
@@ -1881,8 +1942,8 @@
</antcall>
<antcall target="tests.versioning.all_transports_but_bisocket" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_0_0_GA-server"/>
- <param name="server.classpath" value="${etc.dir}/lib/remoting_2_0_0_GA/jboss-remoting.jar"/>
- <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_2_0_0_GA/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value="2"/>
@@ -1895,8 +1956,8 @@
<!-- Current <- -> 1.4.6.GA -->
<antcall target="tests.versioning.all_but_socket_and_bisocket" inheritrefs="true">
<param name="jboss-junit-configuration" value="1_4_6_GA-client"/>
- <param name="client.classpath" value="${etc.dir}/lib/remoting_1_4_6_GA/jboss-remoting.jar"/>
- <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_1_4_6_GA/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value="true"/>
<param name="client.version" value=""/>
@@ -1905,8 +1966,8 @@
<antcall target="tests.versioning.all_but_socket_and_bisocket" inheritrefs="true">
<param name="jboss-junit-configuration" value="1_4_6_GA-server"/>
- <param name="server.classpath" value="${etc.dir}/lib/remoting_1_4_6_GA/jboss-remoting.jar"/>
- <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_1_4_6_GA/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value="true"/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value=""/>
@@ -1922,8 +1983,8 @@
<!-- Current <- -> 1.4.4.GA -->
<antcall target="tests.versioning.all_but_socket_and_bisocket" inheritrefs="true">
<param name="jboss-junit-configuration" value="1_4_4_GA-client"/>
- <param name="client.classpath" value="${etc.dir}/lib/remoting_1_4_4_GA/jboss-remoting.jar"/>
- <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_1_4_4_GA/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value="true"/>
<param name="client.version" value=""/>
@@ -1932,8 +1993,8 @@
<antcall target="tests.versioning.all_but_socket_and_bisocket" inheritrefs="true">
<param name="jboss-junit-configuration" value="1_4_4_GA-server"/>
- <param name="server.classpath" value="${etc.dir}/lib/remoting_1_4_4_GA/jboss-remoting.jar"/>
- <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_1_4_4_GA/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value="true"/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value=""/>
@@ -1949,8 +2010,8 @@
<!-- Current <- -> 1.4.3.GA -->
<antcall target="tests.versioning.all_but_socket_and_bisocket" inheritrefs="true">
<param name="jboss-junit-configuration" value="1_4_3_GA-client"/>
- <param name="client.classpath" value="${etc.dir}/lib/remoting_1_4_3_GA/jboss-remoting.jar"/>
- <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_1_4_3_GA/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value="true"/>
<param name="client.version" value=""/>
@@ -1959,8 +2020,8 @@
<antcall target="tests.versioning.all_but_socket_and_bisocket" inheritrefs="true">
<param name="jboss-junit-configuration" value="1_4_3_GA-server"/>
- <param name="server.classpath" value="${etc.dir}/lib/remoting_1_4_3_GA/jboss-remoting.jar"/>
- <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_1_4_3_GA/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value="true"/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value=""/>
@@ -2092,7 +2153,7 @@
<echo>Running: ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
- <path refid="third_party.classpath"/>
+ <path refid="basic.third_party.classpath"/>
<path refid="tests.version.classpath"/>
</classpath>
<jvmarg value="-Dclient.path=${client.classpath}"/>
@@ -2132,7 +2193,7 @@
<echo>Running: ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
- <path refid="third_party.classpath"/>
+ <path refid="basic.third_party.classpath"/>
<path refid="tests.version.classpath"/>
</classpath>
<jvmarg value="-Dclient.path=${client.classpath}"/>
@@ -2173,7 +2234,7 @@
<echo>Running: ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
- <path refid="third_party.classpath"/>
+ <path refid="basic.third_party.classpath"/>
<path refid="tests.version.classpath"/>
</classpath>
<jvmarg value="-Dclient.path=${client.classpath}"/>
@@ -2215,7 +2276,7 @@
<echo>Running: ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
- <path refid="third_party.classpath"/>
+ <path refid="basic.third_party.classpath"/>
<path refid="tests.version.classpath"/>
</classpath>
<jvmarg value="-Dclient.path=${client.classpath}"/>
@@ -2257,8 +2318,8 @@
<antcall target="tests.versioning.socket.sub" inheritrefs="true">
<param name="jboss-junit-configuration" value="${version}-client_nocheck"/>
- <param name="client.classpath" value="${etc.dir}/lib/remoting_${version}/jboss-remoting.jar"/>
- <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_${version}/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value="true"/>
<param name="client.version" value=""/>
@@ -2269,8 +2330,8 @@
<antcall target="tests.versioning.socket.sub" inheritrefs="true">
<param name="jboss-junit-configuration" value="${version}-server_nocheck"/>
- <param name="server.classpath" value="${etc.dir}/lib/remoting_${version}/jboss-remoting.jar"/>
- <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_${version}/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value="true"/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value=""/>
@@ -2285,8 +2346,8 @@
depends="jars, tests.jars">
<antcall target="tests.versioning.socket.sub" inheritrefs="true">
<param name="jboss-junit-configuration" value="${version}-client_check"/>
- <param name="client.classpath" value="${etc.dir}/lib/remoting_${version}/jboss-remoting.jar"/>
- <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_${version}/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value="true"/>
<param name="client.version" value=""/>
@@ -2297,8 +2358,8 @@
<antcall target="tests.versioning.socket.sub" inheritrefs="true">
<param name="jboss-junit-configuration" value="${version}-client_default"/>
- <param name="client.classpath" value="${etc.dir}/lib/remoting_${version}/jboss-remoting.jar"/>
- <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_${version}/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value="true"/>
<param name="client.version" value=""/>
@@ -2309,8 +2370,8 @@
<antcall target="tests.versioning.socket.sub" inheritrefs="true">
<param name="jboss-junit-configuration" value="${version}-server_check"/>
- <param name="server.classpath" value="${etc.dir}/lib/remoting_${version}/jboss-remoting.jar"/>
- <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_${version}/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value="true"/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value=""/>
@@ -2321,8 +2382,8 @@
<antcall target="tests.versioning.socket.sub" inheritrefs="true">
<param name="jboss-junit-configuration" value="${version}-server_default"/>
- <param name="server.classpath" value="${etc.dir}/lib/remoting_${version}/jboss-remoting.jar"/>
- <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_${version}/jboss-remoting.jar${old.extended.classpath}"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar${extended.classpath}"/>
<param name="client.pre_2_0_compatible" value="true"/>
<param name="server.pre_2_0_compatible" value=""/>
<param name="client.version" value=""/>
@@ -2340,7 +2401,7 @@
<echo>Running: ${jboss-junit-configuration}</echo>
<junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
- <path refid="third_party.classpath"/>
+ <path refid="basic.third_party.classpath"/>
<path refid="tests.version.classpath"/>
</classpath>
<jvmarg value="-Dclient.path=${client.classpath}"/>
@@ -3664,7 +3725,7 @@
<include name="**/*.pdf"/>
</fileset>
</copy>
-
+
<copy todir="${dist.dir}/docs/guide/html">
<fileset dir="${basedir}/docs/guide/build/en/html">
<include name="**"/>
@@ -3675,7 +3736,7 @@
<include name="**"/>
</fileset>
</copy>
-
+
<copy todir="${dist.dir}" filtering="no">
<fileset dir="${basedir}/docs">
<include name="README.txt"/>
16 years, 2 months
JBoss Remoting SVN: r4559 - remoting2/branches/2.x/docs.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-09-09 03:11:11 -0400 (Tue, 09 Sep 2008)
New Revision: 4559
Modified:
remoting2/branches/2.x/docs/README.txt
Log:
JBREM-1030: Added release notes and description of 2.5.0.GA.
Modified: remoting2/branches/2.x/docs/README.txt
===================================================================
--- remoting2/branches/2.x/docs/README.txt 2008-09-09 06:59:23 UTC (rev 4558)
+++ remoting2/branches/2.x/docs/README.txt 2008-09-09 07:11:11 UTC (rev 4559)
@@ -12,7 +12,23 @@
Please read the JBoss_Remoting_Guide.pdf in the docs directory for more information about this release and JBoss Remoting.
+Known issues:
+Current issues can be found within the JBoss Remoting project on Jira (http://jira.jboss.com). If you find a bug or issue that is not already
+in Jira, please create one.
+
+==========================================================================================================
+Important features, changes, and differences in 2.5.0 release (from 2.4.0 release)
+
+- Release 2.5.0 represents the process of upgrading the jars with which Remoting is tested and shipped.
+ In particular, the jars are now equivalent to the jars found in the JBoss Application Server version 5.0.0.CR2
+ (as of 9/6/08, before its release). Changes to jbossweb (the JBoss version of Tomcat) have necessitated dropping
+ the use of Apache Tomcat, which means that the "http" transport will no longer function with jdk 1.4.
+
+- Other features of Remoting 2.5.0.GA should function with jdk 1.4. However, it is the policy of JBoss, a division
+ of Red Hat, no longer to support jdk 1.4.
+
+==========================================================================================================
Important features, changes, and differences in 2.4.0 release (from 2.2.0 release)
- Support for server configuration by microcontainer injection [JBREM-63]
@@ -23,12 +39,28 @@
- Server gets client address in invocations
- Multiple bug fixes
+==========================================================================================================
+==========================================================================================================
+Release Notes - JBoss Remoting - Version 2.5.0.GA (Flounder)
+Bug
-Known issues:
+ * [JBREM-1027] - CoyoteInvoker should pass URL query in InvocationRequest
+ * [JBREM-1028] - JavaSerializationManager should clear ObjectOutputStream internal tables
-Current issues can be found within the JBoss Remoting project on Jira (http://jira.jboss.com). If you find a bug or issue that is not already
-in Jira, please create one.
+Release
+ * [JBREM-1030] - Release 2.5.0.GA
+
+Task
+
+ * [JBREM-1029] - Assure version compatibility with earlier versions of Remoting
+ * [JBREM-1033] - Upgrade jars to versions in JBossAS 5.0.0.CR2
+ * [JBREM-1034] - Assure version compatibility with earlier versions of Remoting
+
+Sub-task
+
+ * [JBREM-1032] - Upgrade to the latest jboss-common-core 2.2.8.GA
+
==========================================================================================================
Release Notes - JBoss Remoting - Version 2.4.0.SP2
16 years, 2 months