JBoss Remoting SVN: r4591 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/http/chunked.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-10-02 01:03:29 -0400 (Thu, 02 Oct 2008)
New Revision: 4591
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/http/chunked/ChunkedUnmarshallingTestCase.java
Log:
JBREM-1037: Gets serialization type from metadata.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/http/chunked/ChunkedUnmarshallingTestCase.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/http/chunked/ChunkedUnmarshallingTestCase.java 2008-10-02 04:51:58 UTC (rev 4590)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/http/chunked/ChunkedUnmarshallingTestCase.java 2008-10-02 05:03:29 UTC (rev 4591)
@@ -136,6 +136,11 @@
port = PortUtil.findFreePort(host);
locatorURI = getTransport() + "://" + host + ":" + port;
locatorURI += "/?chunkedLength=10";
+ String metadata = System.getProperty("remoting.metadata");
+ if (metadata != null)
+ {
+ locatorURI += "&" + metadata;
+ }
serverLocator = new InvokerLocator(locatorURI);
log.info("Starting remoting server with locator uri of: " + locatorURI);
HashMap config = new HashMap();
16 years, 2 months
JBoss Remoting SVN: r4590 - remoting2/branches/2.2.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-10-02 00:51:58 -0400 (Thu, 02 Oct 2008)
New Revision: 4590
Modified:
remoting2/branches/2.2/build.xml
Log:
JBREM-1037: Turned on HTTP chunked tests for tests.functional.core.
Modified: remoting2/branches/2.2/build.xml
===================================================================
--- remoting2/branches/2.2/build.xml 2008-10-01 23:00:01 UTC (rev 4589)
+++ remoting2/branches/2.2/build.xml 2008-10-02 04:51:58 UTC (rev 4590)
@@ -593,6 +593,12 @@
</antcall>
<antcall target="tests.marshall" inheritrefs="true">
</antcall>
+ <!-- there are a few tests that will only run under jdk 1.5 (with/without jboss serialization -->
+ <antcall target="tests.functional.main.isJDK5" inheritrefs="true">
+ <param name="remoting.metadata.key" value="remoting.metadata"/>
+ <param name="metadata" value="serializationtype=java"/>
+ <param name="jboss-junit-configuration" value="java_serialization"/>
+ </antcall>
</target>
<!-- runs functional tests with jboss serialization if using jdk 1.5 -->
@@ -625,6 +631,11 @@
</antcall>
<antcall target="tests.nonserializable" inheritrefs="true"/>
<antcall target="tests.functional.main.serialization.jboss" inheritrefs="true"/>
+ <antcall target="tests.functional.main.isJDK5" inheritrefs="true">
+ <param name="remoting.metadata.key" value="remoting.metadata"/>
+ <param name="metadata" value="serializationtype=jboss"/>
+ <param name="jboss-junit-configuration" value="jboss_serialization"/>
+ </antcall>
</target>
16 years, 2 months
JBoss Remoting SVN: r4589 - remoting2/branches/2.2/docs/guide/en.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-10-01 19:00:01 -0400 (Wed, 01 Oct 2008)
New Revision: 4589
Modified:
remoting2/branches/2.2/docs/guide/en/chap16.xml
Log:
JBREM-1020: Added release notes for 2.2.2.SP9 and 2.2.2.SP10..
Modified: remoting2/branches/2.2/docs/guide/en/chap16.xml
===================================================================
--- remoting2/branches/2.2/docs/guide/en/chap16.xml 2008-10-01 22:59:34 UTC (rev 4588)
+++ remoting2/branches/2.2/docs/guide/en/chap16.xml 2008-10-01 23:00:01 UTC (rev 4589)
@@ -17,6 +17,46 @@
<para></para>
<para>==========================================================================================================</para>
+<para>Release Notes - JBoss Remoting - Version 2.2.2.SP10</para>
+
+<para>Bug</para>
+
+ <para>* [JBREM-925] - SSLSocketBuilder config attribute names out of sync with docs</para>
+ <para>* [JBREM-1021] - JavaSerializationManager should not log exceptions at ERROR level</para>
+ <para>* [JBREM-1022] - Fix misleading javadoc in InvokerLocator</para>
+ <para>* [JBREM-1027] - CoyoteInvoker should pass URL query in InvocationRequest</para>
+ <para>* [JBREM-1037] - CLONE [JBREM-1006] - SOA MTOM bug points to bug in Remoting codebase</para>
+
+<para>Release</para>
+
+ <para>* [JBREM-1020] - Release 2.2.2.SP10</para>
+
+<para>Task</para>
+
+ <para>* [JBREM-1038] - Assure version compatibility with earlier versions of Remoting</para>
+
+<para>==========================================================================================================</para>
+<para>Release Notes - JBoss Remoting - Version 2.2.2.SP9</para>
+
+<para>Bug</para>
+
+ <para>* [JBREM-1005] - Prevent build up of cancelled TimerTasks in bisocket transport</para>
+ <para>* [JBREM-1014] - Support injection of socket factory class name into AbstractInvoker</para>
+
+<para>Feature Request</para>
+
+ <para>* [JBREM-1010] - Add feature to declaratively turn on leasing for 2.2.2</para>
+
+<para>Release</para>
+
+ <para>* [JBREM-1011] - Release 2.2.2.SP9</para>
+
+<para>Task</para>
+
+ <para>* [JBREM-1013] - Assure version compatibility with earlier versions of Remoting</para>
+ <para>* [JBREM-1017] - Improve socket timeout log message</para>
+
+<para>==========================================================================================================</para>
<para>Release Notes - JBoss Remoting - Version 2.2.2.SP8</para>
<para>Bug</para>
16 years, 2 months
JBoss Remoting SVN: r4588 - remoting2/branches/2.2/docs/guide/en.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-10-01 18:59:34 -0400 (Wed, 01 Oct 2008)
New Revision: 4588
Modified:
remoting2/branches/2.2/docs/guide/en/chap1.xml
Log:
JBREM-1020: Added notes about 2.2.2.SP8, 2.2.2.SP9, and 2.2.2.SP10..
Modified: remoting2/branches/2.2/docs/guide/en/chap1.xml
===================================================================
--- remoting2/branches/2.2/docs/guide/en/chap1.xml 2008-10-01 19:13:51 UTC (rev 4587)
+++ remoting2/branches/2.2/docs/guide/en/chap1.xml 2008-10-01 22:59:34 UTC (rev 4588)
@@ -180,8 +180,42 @@
<section>
<title>What's new?</title>
+
+ <section>
+ <title>In release 2.2.2.SP10</title>
+
+ <orderedlist>
+ <listitem><para><classname>CoyoteInvoker</classname> stores <classname>InvokerLocator</classname> query
+ in <classname>InvocationRequest</classname>;</para></listitem>
+ <listitem><para>miscellaneous bug and documentation fixes.</para></listitem>
+ </orderedlist>
+
+ </section>
<section>
+ <title>In release 2.2.2.SP9</title>
+
+ <orderedlist>
+ <listitem><para>Fixed potential build up of cancelled <classname>TimerTasks</classname> in bisocket transport;</para></listitem>
+ <listitem><para>it's possible to turn on server side connection monitoring (leasing) declaratively;</para></listitem>
+ <listitem><para>miscellaneous bug fixes.</para></listitem>
+ </orderedlist>
+
+ </section>
+
+ <section>
+ <title>In release 2.2.2.SP8</title>
+
+ <orderedlist>
+ <listitem><para>Remoting remote classloading facility now works with isolated EARs;</para></listitem>
+ <listitem><para><classname>InvokerLocator</classname> can process zone indices;</para></listitem>
+ <listitem><para>improved client side connection monitoring;</para></listitem>
+ <listitem><para>miscellaneous bug fixes.</para></listitem>
+ </orderedlist>
+
+ </section>
+
+ <section>
<title>In release 2.2.2.SP7</title>
<orderedlist>
16 years, 2 months
JBoss Remoting SVN: r4587 - remoting2/branches/2.2/docs/guide/en.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-10-01 15:13:51 -0400 (Wed, 01 Oct 2008)
New Revision: 4587
Modified:
remoting2/branches/2.2/docs/guide/en/master.xml
Log:
JBREM-1020: Updated version to 2.2.2.SP10..
Modified: remoting2/branches/2.2/docs/guide/en/master.xml
===================================================================
--- remoting2/branches/2.2/docs/guide/en/master.xml 2008-10-01 19:10:48 UTC (rev 4586)
+++ remoting2/branches/2.2/docs/guide/en/master.xml 2008-10-01 19:13:51 UTC (rev 4587)
@@ -22,9 +22,9 @@
<bookinfo>
<title>JBoss Remoting Guide</title>
- <subtitle>JBoss Remoting version 2.2.2.SP8</subtitle>
+ <subtitle>JBoss Remoting version 2.2.2.SP10</subtitle>
- <releaseinfo>June 22, 2008</releaseinfo>
+ <releaseinfo>October 1, 2008</releaseinfo>
<mediaobject>
<imageobject>
16 years, 2 months
JBoss Remoting SVN: r4586 - remoting2/branches/2.2/docs/guide/en.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-10-01 15:10:48 -0400 (Wed, 01 Oct 2008)
New Revision: 4586
Modified:
remoting2/branches/2.2/docs/guide/en/chap5.xml
Log:
JBREM-1020: Added id to <chapter> element.
Modified: remoting2/branches/2.2/docs/guide/en/chap5.xml
===================================================================
--- remoting2/branches/2.2/docs/guide/en/chap5.xml 2008-10-01 19:09:13 UTC (rev 4585)
+++ remoting2/branches/2.2/docs/guide/en/chap5.xml 2008-10-01 19:10:48 UTC (rev 4586)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<chapter>
+<chapter id="chapter-configuration" xreflabel="Configuration">
<title>Configuration</title>
<para>This covers the configuration for JBoss Remoting discovery,
16 years, 2 months
JBoss Remoting SVN: r4585 - remoting2/branches/2.2/docs.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-10-01 15:09:13 -0400 (Wed, 01 Oct 2008)
New Revision: 4585
Modified:
remoting2/branches/2.2/docs/README.txt
Log:
JBREM-1020: Added 2.2.2.SP10 release notes.
Modified: remoting2/branches/2.2/docs/README.txt
===================================================================
--- remoting2/branches/2.2/docs/README.txt 2008-10-01 06:05:40 UTC (rev 4584)
+++ remoting2/branches/2.2/docs/README.txt 2008-10-01 19:09:13 UTC (rev 4585)
@@ -1,5 +1,5 @@
-JBoss Remoting 2.2.0.SP4
-March 19, 2007
+JBoss Remoting 2.2.2.SP10
+October 1, 2008
This distribution of JBoss Remoting contains the following directories:
@@ -27,6 +27,25 @@
in Jira, please create one.
==========================================================================================================
+Release Notes - JBoss Remoting - Version 2.2.2.SP10
+
+Bug
+
+ * [JBREM-925] - SSLSocketBuilder config attribute names out of sync with docs
+ * [JBREM-1021] - JavaSerializationManager should not log exceptions at ERROR level
+ * [JBREM-1022] - Fix misleading javadoc in InvokerLocator
+ * [JBREM-1027] - CoyoteInvoker should pass URL query in InvocationRequest
+ * [JBREM-1037] - CLONE [JBREM-1006] - SOA MTOM bug points to bug in Remoting codebase
+
+Release
+
+ * [JBREM-1020] - Release 2.2.2.SP10
+
+Task
+
+ * [JBREM-1038] - Assure version compatibility with earlier versions of Remoting
+
+==========================================================================================================
Release Notes - JBoss Remoting - Version 2.2.2.SP9
Bug
16 years, 2 months
JBoss Remoting SVN: r4584 - remoting2/branches/2.2.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-10-01 02:05:40 -0400 (Wed, 01 Oct 2008)
New Revision: 4584
Modified:
remoting2/branches/2.2/build.xml
Log:
JBREM-1038: Added 2.2.2.SP9 to versioning tests.
Modified: remoting2/branches/2.2/build.xml
===================================================================
--- remoting2/branches/2.2/build.xml 2008-10-01 05:55:19 UTC (rev 4583)
+++ remoting2/branches/2.2/build.xml 2008-10-01 06:05:40 UTC (rev 4584)
@@ -966,8 +966,31 @@
<param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
<param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
</antcall>
-
+
<!-- ******************************************************************************** -->
+ <!-- Current <- -> 2.2.2.SP9 -->
+ <antcall target="tests.versioning.all_transports" 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"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <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" 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"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <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"/>
+ </antcall>
+
+ <!-- ******************************************************************************** -->
<!-- Current <- -> 2.2.2.SP7 -->
<antcall target="tests.versioning.all_transports" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_2_2_SP7-client"/>
@@ -981,7 +1004,7 @@
</antcall>
<antcall target="tests.versioning.all_transports" 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="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="client.pre_2_0_compatible" value=""/>
<param name="server.pre_2_0_compatible" value=""/>
@@ -989,7 +1012,7 @@
<param name="server.version" value=""/>
<param name="check_connection" value="false"/>
</antcall>
-
+
<!-- ******************************************************************************** -->
<!-- Current <- -> 2.2.2.SP4 -->
<antcall target="tests.versioning.all_transports" inheritrefs="true">
@@ -1012,7 +1035,7 @@
<param name="server.version" value=""/>
<param name="check_connection" value="false"/>
</antcall>
-
+
<!-- ******************************************************************************** -->
<!-- Current <- -> 2.2.2.SP2 -->
<antcall target="tests.versioning.all_transports" inheritrefs="true">
@@ -1058,7 +1081,7 @@
<param name="server.version" value=""/>
<param name="check_connection" value="false"/>
</antcall>
-
+
<!-- ******************************************************************************** -->
<!-- Current <- -> 2.2.2.GA -->
<antcall target="tests.versioning.all_transports" inheritrefs="true">
@@ -1104,7 +1127,7 @@
<param name="server.version" value=""/>
<param name="check_connection" value="false"/>
</antcall>
-
+
<!-- ******************************************************************************** -->
<!-- Current <- -> 2.0.0.GA -->
<antcall target="tests.versioning.all_transports_but_bisocket" inheritrefs="true">
@@ -1139,7 +1162,7 @@
<param name="client.version" value=""/>
<param name="server.version" value=""/>
</antcall>
-
+
<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"/>
@@ -1149,9 +1172,9 @@
<param name="client.version" value=""/>
<param name="server.version" value=""/>
</antcall>
-
+
<antcall target="tests.versioning.socket" inheritrefs="true">
- <param name="version" value="1_4_6_GA"/>
+ <param name="version" value="1_4_6_GA"/>
</antcall>
<!-- ******************************************************************************** -->
@@ -1165,7 +1188,7 @@
<param name="client.version" value=""/>
<param name="server.version" value=""/>
</antcall>
-
+
<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"/>
@@ -1175,9 +1198,9 @@
<param name="client.version" value=""/>
<param name="server.version" value=""/>
</antcall>
-
+
<antcall target="tests.versioning.socket" inheritrefs="true">
- <param name="version" value="1_4_4_GA"/>
+ <param name="version" value="1_4_4_GA"/>
</antcall>
<!-- ******************************************************************************** -->
@@ -1191,7 +1214,7 @@
<param name="client.version" value=""/>
<param name="server.version" value=""/>
</antcall>
-
+
<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"/>
@@ -1201,9 +1224,9 @@
<param name="client.version" value=""/>
<param name="server.version" value=""/>
</antcall>
-
+
<antcall target="tests.versioning.socket" inheritrefs="true">
- <param name="version" value="1_4_3_GA"/>
+ <param name="version" value="1_4_3_GA"/>
</antcall>
<!-- ******************************************************************************** -->
16 years, 2 months
JBoss Remoting SVN: r4583 - remoting2/branches/2.2.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-10-01 01:55:19 -0400 (Wed, 01 Oct 2008)
New Revision: 4583
Modified:
remoting2/branches/2.2/build.xml
Log:
JBREM-1020: Updated version to 2.2.2.SP10.
Modified: remoting2/branches/2.2/build.xml
===================================================================
--- remoting2/branches/2.2/build.xml 2008-10-01 05:53:42 UTC (rev 4582)
+++ remoting2/branches/2.2/build.xml 2008-10-01 05:55:19 UTC (rev 4583)
@@ -37,9 +37,9 @@
<!-- Module name(s) & version -->
<property name="module.name" value="remoting"/>
<property name="module.Name" value="JBoss Remoting"/>
- <property name="module.version" value="2.2.2.SP9"/>
+ <property name="module.version" value="2.2.2.SP10"/>
<!-- extension is for the file suffix to use for distribution build -->
- <property name="module.version.extension" value="2_2_2_SP9"/>
+ <property name="module.version.extension" value="2_2_2_SP10"/>
<property name="implementation.url" value="http://www.jboss.org/products/remoting"/>
<property name="root.dir" value="${basedir}"/>
16 years, 2 months
JBoss Remoting SVN: r4582 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/http/chunked.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-10-01 01:53:42 -0400 (Wed, 01 Oct 2008)
New Revision: 4582
Added:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/http/chunked/ChunkedUnmarshallingTestCase.java
Log:
JBREM-1037: New unit test.
Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/http/chunked/ChunkedUnmarshallingTestCase.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/http/chunked/ChunkedUnmarshallingTestCase.java (rev 0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/http/chunked/ChunkedUnmarshallingTestCase.java 2008-10-01 05:53:42 UTC (rev 4582)
@@ -0,0 +1,187 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.test.remoting.transport.http.chunked;
+
+import java.net.InetAddress;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.management.MBeanServer;
+
+import junit.framework.TestCase;
+
+import org.apache.log4j.ConsoleAppender;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.apache.log4j.PatternLayout;
+import org.jboss.logging.XLevel;
+import org.jboss.remoting.Client;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.remoting.ServerInvoker;
+import org.jboss.remoting.callback.Callback;
+import org.jboss.remoting.callback.HandleCallbackException;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+import org.jboss.remoting.transport.Connector;
+import org.jboss.remoting.transport.PortUtil;
+
+
+/**
+ * Unit test for JBREM-1037.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1 $
+ * <p>
+ * Copyright Aug 8, 2008
+ * </p>
+ */
+public class ChunkedUnmarshallingTestCase extends TestCase
+{
+ private static Logger log = Logger.getLogger(ChunkedUnmarshallingTestCase.class);
+
+ private static boolean firstTime = true;
+
+ protected String host;
+ protected int port;
+ protected String locatorURI;
+ protected InvokerLocator serverLocator;
+ protected Connector connector;
+ protected TestInvocationHandler invocationHandler;
+
+
+ public void setUp() throws Exception
+ {
+ if (firstTime)
+ {
+ firstTime = false;
+ Logger.getLogger("org.jboss.remoting").setLevel(XLevel.INFO);
+ Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
+ String pattern = "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
+ PatternLayout layout = new PatternLayout(pattern);
+ ConsoleAppender consoleAppender = new ConsoleAppender(layout);
+ Logger.getRootLogger().addAppender(consoleAppender);
+ }
+ }
+
+
+ public void tearDown()
+ {
+ }
+
+
+ public void testChunkedTransmission() throws Throwable
+ {
+ log.info("entering " + getName());
+
+ // Start server.
+ setupServer();
+
+ // Create client.
+ InvokerLocator clientLocator = new InvokerLocator(locatorURI);
+ HashMap clientConfig = new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client = new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+
+ // Test connections.
+ HashMap metadata = new HashMap();
+ metadata.put(Client.RAW, "true");
+ String message = "abcdefghijklmnopqrstuvwxyz";
+ assertEquals(message, client.invoke(message, metadata));
+ log.info("connection is good");
+ assertTrue(invocationHandler.isChunked);
+ log.info("invocation was sent chunked");
+
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+
+
+ protected String getTransport()
+ {
+ return "http";
+ }
+
+
+ protected void addExtraClientConfig(Map config) {}
+ protected void addExtraServerConfig(Map config) {}
+
+
+ protected void setupServer() throws Exception
+ {
+ host = InetAddress.getLocalHost().getHostAddress();
+ port = PortUtil.findFreePort(host);
+ locatorURI = getTransport() + "://" + host + ":" + port;
+ locatorURI += "/?chunkedLength=10";
+ serverLocator = new InvokerLocator(locatorURI);
+ log.info("Starting remoting server with locator uri of: " + locatorURI);
+ HashMap config = new HashMap();
+ config.put(InvokerLocator.FORCE_REMOTE, "true");
+ addExtraServerConfig(config);
+ connector = new Connector(serverLocator, config);
+ connector.create();
+ invocationHandler = new TestInvocationHandler();
+ connector.addInvocationHandler("test", invocationHandler);
+ connector.start();
+ }
+
+
+ protected void shutdownServer() throws Exception
+ {
+ if (connector != null)
+ connector.stop();
+ }
+
+
+ static class TestInvocationHandler implements ServerInvocationHandler
+ {
+ boolean isChunked;
+
+ public void addListener(InvokerCallbackHandler callbackHandler) {}
+ public Object invoke(final InvocationRequest invocation) throws Throwable
+ {
+ Map requestMap = invocation.getRequestPayload();
+ if (requestMap != null)
+ {
+ String transferEncoding = (String) requestMap.get("transfer-encoding");
+ isChunked = "chunked".equalsIgnoreCase(transferEncoding);
+ }
+ return invocation.getParameter();
+ }
+ public void removeListener(InvokerCallbackHandler callbackHandler) {}
+ public void setMBeanServer(MBeanServer server) {}
+ public void setInvoker(ServerInvoker invoker) {}
+ }
+
+
+ static class TestCallbackHandler implements InvokerCallbackHandler
+ {
+ public void handleCallback(Callback callback) throws HandleCallbackException
+ {
+ log.info("received callback");
+ }
+ }
+}
\ No newline at end of file
16 years, 2 months