JBoss Remoting SVN: r4088 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-29 02:01:09 -0400 (Tue, 29 Apr 2008)
New Revision: 4088
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorClient.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorServer.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorTestCase.java
Log:
JBREM-930: (1) Uses jrunit.bind_addr; (2) set log level to TRACE.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorClient.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorClient.java 2008-04-26 22:08:25 UTC (rev 4087)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorClient.java 2008-04-29 06:01:09 UTC (rev 4088)
@@ -45,7 +45,8 @@
public void setUp() throws Exception
{
- String detectorHost = InetAddress.getLocalHost().getHostName();
+ String host = InetAddress.getLocalHost().getHostName();
+ String detectorHost = System.getProperty("jrunit.bind_addr", host);
detector = new JNDIDetector();
detector.setCleanDetectionNumber(2);
@@ -77,6 +78,7 @@
long end = System.currentTimeMillis();
System.out.println("instance = " + instances);
+ System.out.println("instances.length: " + instances.length);
System.out.println("force detection took " + (end - start) + " milliseconds.");
assertEquals(1, instances.length);
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorServer.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorServer.java 2008-04-26 22:08:25 UTC (rev 4087)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorServer.java 2008-04-29 06:01:09 UTC (rev 4088)
@@ -53,16 +53,14 @@
{
// start JNDI server
int port = 1099;
- //String host = "localhost";
String host = InetAddress.getLocalHost().getHostName();
+ String bindAddr = System.getProperty("jrunit.bind_addr", host);
Main JNDIServer = new Main();
JNDIServer.setPort(port);
- JNDIServer.setBindAddress(host);
+ JNDIServer.setBindAddress(bindAddr);
JNDIServer.start();
- System.out.println("Started JNDI server on " + host + ":" + port);
+ System.out.println("Started JNDI server on " + bindAddr + ":" + port);
- String detectorHost = InetAddress.getLocalHost().getHostName();
-
detector = new JNDIDetector();
detector.setCleanDetectionNumber(2);
@@ -77,7 +75,6 @@
port = TestUtil.getRandomPort();
System.out.println("port = " + port);
- String bindAddr = System.getProperty("jrunit.bind_addr", host);
InvokerLocator locator = new InvokerLocator("socket://" + bindAddr + ":" + port);
System.out.println("Starting remoting server with locator uri of: " + locator.getLocatorURI());
@@ -98,7 +95,7 @@
// set config info for detector and start it.
detector.setPort(detectorPort);
- detector.setHost(detectorHost);
+ detector.setHost(bindAddr);
detector.setContextFactory(contextFactory);
detector.setURLPackage(urlPackage);
detector.start();
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorTestCase.java 2008-04-26 22:08:25 UTC (rev 4087)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup/JNDIDetectorTestCase.java 2008-04-29 06:01:09 UTC (rev 4088)
@@ -21,7 +21,9 @@
*/
package org.jboss.test.remoting.detection.jndi.startup;
+import org.apache.log4j.Level;
import org.jboss.jrunit.harness.TestDriver;
+import org.jboss.logging.XLevel;
/**
* @author <a href="mailto:tom.elrod@jboss.com">Tom Elrod</a>
@@ -35,4 +37,8 @@
JNDIDetectorServer.class.getName());
}
+ protected Level getTestLogLevel()
+ {
+ return XLevel.TRACE;
+ }
}
\ No newline at end of file
16 years, 7 months
JBoss Remoting SVN: r4087 - remoting2/tags.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-26 18:08:25 -0400 (Sat, 26 Apr 2008)
New Revision: 4087
Added:
remoting2/tags/2.4.0-CR2/
Log:
Copied: remoting2/tags/2.4.0-CR2 (from rev 4086, remoting2/branches/2.x)
16 years, 7 months
JBoss Remoting SVN: r4086 - remoting2/branches/2.x/docs.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-26 16:33:17 -0400 (Sat, 26 Apr 2008)
New Revision: 4086
Removed:
remoting2/branches/2.x/docs/multiplex.pdf
Log:
JBREM-968: Deleted since not necessary.
Deleted: remoting2/branches/2.x/docs/multiplex.pdf
===================================================================
(Binary files differ)
16 years, 7 months
JBoss Remoting SVN: r4085 - remoting2/branches/2.x/src/etc/lib.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-26 16:28:44 -0400 (Sat, 26 Apr 2008)
New Revision: 4085
Removed:
remoting2/branches/2.x/src/etc/lib/remoting_2_2_2_SP5/
Log:
JBREM-957: Replaced 2.2.2.SP5 with 2.2.2.SP7 in versioning testes.
16 years, 7 months
JBoss Remoting SVN: r4084 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-26 16:25:49 -0400 (Sat, 26 Apr 2008)
New Revision: 4084
Removed:
remoting2/branches/2.x/test.policy
Log:
JBREM-920, JBREM-934: Deleted unused security policy files.
Deleted: remoting2/branches/2.x/test.policy
===================================================================
--- remoting2/branches/2.x/test.policy 2008-04-26 20:21:20 UTC (rev 4083)
+++ remoting2/branches/2.x/test.policy 2008-04-26 20:25:49 UTC (rev 4084)
@@ -1,265 +0,0 @@
-//****************************************************************************************************************************************************************
-//****************************************************************************************************************************************************************
-//***************************************************
-//**** Permissions to run Remoting itself ****
-//***************************************************
-//***************************************************
-grant codeBase "file:${build.home}/output/classes/-"
-{
-/////////////////////////////////////////////////////////////////////////////////////////////
-// Used by remote class loading system
-
- permission java.lang.RuntimePermission "createClassLoader";
- permission java.lang.RuntimePermission "getClassLoader";
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-// Used by:
-// org.jboss.remoting.security.SSLSOcketBuilder
-// org.jboss.remoting.transport.coyote.CoyoteInvoker
-// org.jboss.remoting.transport.http.HTTPClientInvoker
-// org.jboss.remoting.transport.servlet.web.ServerInvokerServlet
-// org.jboss.remoting.transporter.TransporterHandler
-// org.jboss.remoting.InvokerRegistry
-
- permission java.lang.RuntimePermission "accessClassInPackage.*";
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-// Can't create sockets without it
-
- permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-// MBean permissions
-
- permission javax.management.MBeanServerPermission "createMBeanServer, releaseMBeanServer";
- permission javax.management.MBeanTrustPermission "register";
-
- // org.jboss.remoting.callback.ServerInvokerCallbackHandler
- permission javax.management.MBeanPermission "*#SSLSocketBuilder[*:*]", "getAttribute";
- permission javax.management.MBeanPermission "org.jboss.remoting.security.SSLServerSocketFactoryServiceMBean#-[*:*]", "isInstanceOf";
- permission javax.management.MBeanPermission "org.jboss.remoting.security.SSLServerSocketFactoryService#-[*:*]", "getClassLoaderFor, isInstanceOf";
-
- // org.jboss.remoting.detection.AbstractDetector
- permission javax.management.MBeanPermission "*#addServer[remoting:type=NetworkRegistry]", "invoke";
- permission javax.management.MBeanPermission "*#updateServer[remoting:type=NetworkRegistry]", "invoke";
- permission javax.management.MBeanPermission "*#removeServer[remoting:type=NetworkRegistry]", "invoke";
- permission javax.management.MBeanPermission "*#Servers[*:*]", "getAttribute";
-
- // org.jboss.remoting.detection.util.DetectorUtil
- permission javax.management.MBeanPermission "org.jboss.remoting.network.NetworkRegistry#-[remoting:type=NetworkRegistry]", "registerMBean";
- permission javax.management.MBeanPermission "org.jboss.remoting.transport.Connector#-[jboss.remoting:type=Connector,*]", "registerMBean, queryMBeans, isInstanceOf";
-
- // org.jboss.remoting.ident.Identity
- permission javax.management.MBeanPermission "javax.management.MBeanServerDelegate#-[JMImplementation:type=MBeanServerDelegate]", "queryMBeans, isInstanceOf";
- permission javax.management.MBeanPermission "javax.management.MBeanServerDelegate#MBeanServerId[JMImplementation:type=MBeanServerDelegate]", "getAttribute";
- permission javax.management.MBeanPermission "-#ServerDataDir[jboss.system:type=ServerConfig]", "getAttribute";
-
- // org.jboss.remoting.network.NetworkRegistryFinder
- permission javax.management.MBeanPermission "*#-[*:*]", "queryMBeans";
-
- // org.jboss.remoting.network.NetworkRegistryQuery
- permission javax.management.MBeanPermission "org.jboss.remoting.network.NetworkRegistry#-[*:*]", "isInstanceOf";
-
- // org.jboss.remoting.security.CustomSSLServerSocketFactory
- permission javax.management.MBeanPermission "org.jboss.remoting.security.CustomSSLServerSocketFactory#*[*:*]", "invoke";
-
- // org.jboss.remoting.security.ServerSocketFactoryWrapper
- permission javax.management.MBeanPermission "*#createServerSocket[*:*]", "invoke";
-
- // org.jboss.remoting.transport.Connector
- permission javax.management.MBeanPermission "org.jboss.remoting.transport.*#-[jboss.remoting:service=invoker,*]", "unregisterMBean, registerMBean, queryMBeans, isInstanceOf";
-
- // org.jboss.remoting.transporter.InternalTransporterServices
- permission javax.management.MBeanPermission "org.jboss.remoting.network.NetworkRegistry#-[remoting:type=NetworkRegistry]", "registerMBean";
-
-// permission javax.management.MBeanPermission "*#-[*:*]", "isInstanceOf, registerMBean";
-
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-// System properties accessed by Remoting
-
- permission java.util.PropertyPermission "SERIALIZATION", "read";
- permission java.util.PropertyPermission "file.separator", "read";
- permission java.util.PropertyPermission "http.basic.password", "read";
- permission java.util.PropertyPermission "http.basic.username", "read";
- permission java.util.PropertyPermission "javax.net.ssl.keyStore", "read";
- permission java.util.PropertyPermission "javax.net.ssl.keyStorePassword", "read";
- permission java.util.PropertyPermission "javax.net.ssl.keyStoreType", "read";
- permission java.util.PropertyPermission "javax.net.ssl.trustStore", "read";
- permission java.util.PropertyPermission "javax.net.ssl.trustStorePassword", "read";
- permission java.util.PropertyPermission "javax.net.ssl.trustStoreType", "read";
- permission java.util.PropertyPermission "jboss.bind.address", "read";
- permission java.util.PropertyPermission "jboss.identity", "read, write";
- permission java.util.PropertyPermission "jboss.identity.dir", "read";
- permission java.util.PropertyPermission "jboss.identity.domain", "read";
- permission java.util.PropertyPermission "jboss.remoting.compression.debug", "read";
- permission java.util.PropertyPermission "jboss.remoting.compression.min", "read";
- permission java.util.PropertyPermission "jboss.remoting.domain", "write";
- permission java.util.PropertyPermission "jboss.remoting.instanceid", "write";
- permission java.util.PropertyPermission "jboss.remoting.jmxid", "write";
- permission java.util.PropertyPermission "jboss.remoting.pre_2_0_compatible", "read";
- permission java.util.PropertyPermission "jboss.remoting.version", "read, write";
- permission java.util.PropertyPermission "jboss.server.data.dir", "read";
- permission java.util.PropertyPermission "legacyParsing", "read";
- permission java.util.PropertyPermission "org.apache.tomcat.util.*", "read";
- permission java.util.PropertyPermission "org.jboss.remoting.defaultSocketFactory", "read";
- permission java.util.PropertyPermission "org.jboss.security.ignoreHttpsHost" , "read";
- permission java.util.PropertyPermission "remoting.bind_by_host", "read";
- permission java.util.PropertyPermission "remoting.stream.host", "read";
- permission java.util.PropertyPermission "remoting.stream.port", "read";
- permission java.util.PropertyPermission "remoting.stream.transport", "read";
- permission java.util.PropertyPermission "tomcat.util.buf.StringCache.*", "read";
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-// File permissions
-
- permission java.io.FilePermission "${build.home}", "read";
- permission java.io.FilePermission "${build.home}/jboss.identity", "read";
- permission java.io.FilePermission "${build.home}", "read";
- permission java.io.FilePermission "-", "read";
- permission java.io.FilePermission "-", "delete"; // Used by org.jboss.remotinng.callback.CallbackStore: configurable.
-
- // Permission for org.jboss.remoting.ident.Identity to create and read "jboss.identity" file. Could be extended.
- permission java.io.FilePermission "-", "read, write";
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-// Tomcat native - TODO - this should be in a privileged block in jbossnative
-
- permission java.lang.RuntimePermission "loadLibrary.tcnative-1";
- permission java.lang.RuntimePermission "loadLibrary.libtcnative-1";
- permission java.util.PropertyPermission "java.library.path", "read";
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-// TODO - JBoss Serialization SHOULD be doing these operations in a privileged block - JBSER-105
-
- permission java.lang.RuntimePermission "accessDeclaredMembers";
- permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
- permission java.lang.RuntimePermission "accessClassInPackage.sun.reflect";
- permission java.lang.RuntimePermission "reflectionFactoryAccess";
- permission java.io.SerializablePermission "enableSubclassImplementation";
- permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
- permission java.io.SerializablePermission "enableSubstitution"; // <- this one is a "maybe" :-)
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-// TODO - We should use a version of JBoss logging + log4j that does this stuff in privileged blocks
-
- permission java.util.PropertyPermission "org.jboss.logging.Logger.pluginClass", "read";
- permission java.io.FilePermission "${build.home}/src/etc/log4j.properties", "read";
- permission java.util.PropertyPermission "log4j.defaultInitOverride", "read";
- permission java.io.FilePermission "${build.home}/src/etc/log4j.xml", "read";
- permission java.lang.RuntimePermission "accessClassInPackage.sun.net.www.protocol.dummy";
- permission java.io.FilePermission "${build.home}/lib/apache-log4j/lib/log4j.jar", "read";
- permission java.util.PropertyPermission "elementAttributeLimit", "read";
- permission java.util.PropertyPermission "maxOccurLimit", "read";
- permission java.util.PropertyPermission "entityExpansionLimit", "read";
- permission java.util.PropertyPermission "javax.xml.parsers.DocumentBuilderFactory", "read";
- permission java.util.PropertyPermission "log4j.ignoreTCL", "read";
- permission java.util.PropertyPermission "log4j.configuratorClass", "read";
- permission java.util.PropertyPermission "log4j.configDebug", "read";
- permission java.util.PropertyPermission "log4j.debug", "read";
- permission java.util.PropertyPermission "log4j.configuration", "read";
- permission java.util.PropertyPermission "org.apache.commons.logging.LogFactory", "read";
- permission java.util.PropertyPermission "org.apache.commons.logging.Log", "read";
- permission java.lang.RuntimePermission "accessClassInPackage.sun.util.logging.resources";
- permission java.io.FilePermission "${build.home}/output/classes/-", "read";
-};
-
-
-//****************************************************************************************************************************************************************
-//****************************************************************************************************************************************************************
-//******************************************************************
-//**** Permissions for third party libraries ****
-//******************************************************************
-//******************************************************************
-grant codeBase "file:${build.home}/lib/-"
-{
- permission java.security.AllPermission;
-};
-
-grant codeBase "file:${ant.library.dir}/-" {
- permission java.security.AllPermission;
-};
-
-//grant codeBase "file:${build.home}/src/etc/-" {
-// permission java.security.AllPermission;
-//};
-
-
-//****************************************************************************************************************************************************************
-//****************************************************************************************************************************************************************
-//******************************************************************
-//**** Permissions needed by Remoting to run the test suite ****
-//******************************************************************
-//******************************************************************
-grant codeBase "file:${build.home}/output/classes/-"
-{
- // Permission to read the test keystore
- permission java.io.FilePermission "${build.home}/output/tests/classes/-", "read";
-
- // org.jboss.test.remoting.detection.metadata.MetadataTestCase
- permission javax.management.MBeanPermission "org.jboss.test.remoting.detection.metadata.MetadataTestCase$TestNetworkRegistry#-[remoting:type=NetworkRegistry]", "isInstanceOf";
-};
-
-
-//****************************************************************************************************************************************************************
-//****************************************************************************************************************************************************************
-//***************************************************
-//**** Permissions used by the test suite ****
-//***************************************************
-//***************************************************
-grant codeBase "file:${build.home}/output/tests/classes/-"
-{
- // Used by the test suite itself
- permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
- permission javax.management.MBeanServerPermission "createMBeanServer, findMBeanServer";
- permission javax.management.MBeanServerPermission "*";
- permission javax.management.MBeanTrustPermission "register";
- permission javax.management.MBeanPermission "org.jboss.remoting.transport.*#-[jboss.remoting:service=invoker,*]", "unregisterMBean, registerMBean, queryMBeans, isInstanceOf";
- permission javax.management.MBeanPermission "org.jboss.remoting.transport.Connector#-[jboss.remoting:type=Connector,*]", "registerMBean, unregisterMBean, queryMBeans, isInstanceOf";
- permission javax.management.MBeanPermission "org.jboss.remoting.transport.Connector#-[test:type=connector]", "registerMBean";
- permission javax.management.MBeanPermission "org.jboss.test.remoting.detection.metadata.MetadataTestCase$TestNetworkRegistry#-[remoting:type=NetworkRegistry]", "registerMBean, unregisterMBean, queryMBeans, isInstanceOf, addNotificationListener";
- permission javax.management.MBeanPermission "org.jboss.remoting.network.NetworkRegistry#-[remoting:type=NetworkRegistry]", "registerMBean, unregisterMBean, queryMBeans, isInstanceOf, addNotificationListener";
- permission javax.management.MBeanPermission "org.jboss.remoting.detection.multicast.MulticastDetector#-[remoting:*]", "registerMBean, unregisterMBean, queryMBeans, isInstanceOf";
- permission javax.management.MBeanPermission "org.jboss.remoting.security.SSLServerSocketFactoryService#-[jboss:type=serversocketfactory]", "registerMBean, queryMBeans, isInstanceOf";
- permission javax.management.MBeanPermission "org.jboss.test.remoting.transport.config.FactoryConfigTestCaseParent$SelfIdentifyingServerSocketFactory#-[jboss:type=serversocketfactory]", "registerMBean, queryMBeans, isInstanceOf";
- permission javax.management.MBeanPermission "org.jboss.remoting.security.SSLServerSocketFactoryService#-[jboss:type=serversocketfactory2]", "registerMBean";
- permission javax.management.MBeanPermission "org.jboss.remoting.security.SSLServerSocketFactoryService#createServerSocket[jboss:*]", "invoke";
- permission javax.management.MBeanPermission "org.jboss.test.remoting.transport.rmi.ssl.config.FactoryConfigTestCase$SerializableServerSocketFactory#-[jboss:type=serversocketfactory]", "registerMBean";
- permission javax.management.MBeanPermission "org.jboss.test.remoting.transport.rmi.ssl.config.FactoryConfigTestCase$SerializableServerSocketFactory#-[jboss:type=serversocketfactory2]", "registerMBean";
- permission javax.management.MBeanPermission "org.jboss.remoting.transport.socket.SocketServerInvoker#Configuration[jboss.remoting:service=invoker,*]", "getAttribute";
-
- permission java.lang.RuntimePermission "enableContextClassLoaderOverride";
- permission java.lang.RuntimePermission "createClassLoader";
- permission java.lang.RuntimePermission "getClassLoader";
- permission java.lang.RuntimePermission "setContextClassLoader";
- permission java.io.FilePermission "${build.home}/output/tests/classes/org/jboss/test/remoting/classloader/race/test.jar", "read";
-
- // Used by the descendents of org.jboss.test.remoting.shutdown.ShutdownTestParent.
- permission java.io.FilePermission "<<ALL FILES>>", "execute";
-
- // This is technically the JNP server, but it seems intentional - note that this might mask other problems though
- permission java.net.SocketPermission "*:*", "accept, connect, resolve";
-
- // TODO - this stuff ought to be in privileged blocks within the Ant JUnit task
- permission java.util.PropertyPermission "*", "read, write"; // ugh
-
- // TODO - JBoss Serialization SHOULD be doing these operations in a privileged block - JBSER-105
- permission java.lang.RuntimePermission "accessDeclaredMembers";
- permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
- permission java.lang.RuntimePermission "accessClassInPackage.sun.reflect";
- permission java.lang.RuntimePermission "reflectionFactoryAccess";
- permission java.io.SerializablePermission "enableSubclassImplementation";
- permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
- permission java.io.SerializablePermission "enableSubstitution"; // <- this one is a "maybe" :-)
-
- permission java.util.PropertyPermission "loader.path", "read";
-
- // TESTING ONLY - Use with the LoggingSecurityManager to locate needed permissions for the above block
-// permission java.security.AllPermission;
-};
-
-
-grant
-{
-// permission java.security.SecurityPermission "getProperty.*";
-};
\ No newline at end of file
16 years, 7 months
JBoss Remoting SVN: r4083 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-26 16:21:20 -0400 (Sat, 26 Apr 2008)
New Revision: 4083
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/HTTPInvokerClientTestCase_deleted.java
Removed:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/HTTPInvokerClientTestCase.java
Log:
JBREM-930: Renamed HTTPInvokerClientTestCase so it won't run in test suite.
Deleted: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/HTTPInvokerClientTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/HTTPInvokerClientTestCase.java 2008-04-26 20:17:38 UTC (rev 4082)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/HTTPInvokerClientTestCase.java 2008-04-26 20:21:20 UTC (rev 4083)
@@ -1,259 +0,0 @@
-/*
-* 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;
-
-import junit.framework.TestCase;
-import org.apache.log4j.Level;
-import org.jboss.remoting.Client;
-import org.jboss.remoting.InvokerLocator;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * Test case that uses the HTTPInvoker client to call on two different public SOAP services (one based
- * on Axis and the other based on .NET implementations).
- *
- * @author <a href="mailto:telrod@e2technologies.net">Tom Elrod</a>
- */
-public class HTTPInvokerClientTestCase extends TestCase
-{
- private Client client;
-
- public void init(String httpTargetURL)
- {
- try
- {
- InvokerLocator locator = new InvokerLocator(httpTargetURL);
- Map config = new HashMap();
- config.put(Client.ENABLE_LEASE, "false");
- client = new Client(locator, config);
- client.connect();
- }
- catch(Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public String makeInvocationCall(String httpTargetURL, String payload, Map metadata) throws Throwable
- {
- init(httpTargetURL);
- Object obj = client.invoke(payload, metadata);
-
- System.out.println("invoke returned" + obj);
-
- return (String) obj;
- }
-
- /* *** commented out because external site no longer available ***
- public void testWeatherHTTPInvocation() throws Throwable
- {
-
- org.apache.log4j.BasicConfigurator.configure();
- org.apache.log4j.Category.getRoot().setLevel(Level.INFO);
- org.apache.log4j.Category.getInstance("org.jgroups").setLevel(Level.INFO);
- org.apache.log4j.Category.getInstance("org.jboss.remoting").setLevel(Level.DEBUG);
- org.apache.log4j.Category.getInstance("test").setLevel(Level.DEBUG);
-
-
- String testURL = "http://services.xmethods.net:80/soap/servlet/rpcrouter";
-
- String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
- "<soap:Envelope xmlns:mrns0=\"urn:xmethods-Temperature\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n" +
- " <soap:Body soap:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n" +
- " <mrns0:getTemp>\n" +
- " <zipcode xsi:type=\"xs:string\">30106</zipcode>\n" +
- " </mrns0:getTemp>\n" +
- " </soap:Body>\n" +
- "</soap:Envelope>";
-
- Map metadata = new HashMap();
- metadata.put(Client.RAW, Boolean.TRUE);
- metadata.put("TYPE", "POST");
-
- // proxy info
- //metadata.put("http.proxyHost", "ginger");
- //metadata.put("http.proxyPort", "80");
- //metadata.put("http.proxy.username", "tom");
- //metadata.put("http.proxy.password", "foobar");
-
- Properties headerProps = new Properties();
- headerProps.put("SOAPAction", "");
- headerProps.put("Content-type", "text/xml; charset=UTF-8");
-
- metadata.put("HEADER", headerProps);
-
-
- HTTPInvokerClientTestCase client = new HTTPInvokerClientTestCase();
-
- String result = client.makeInvocationCall(testURL, xml, metadata);
- // don't need to comapre full string. (as actual temp value will change each time run)
- assertEquals(getExpectedWeatherResult().substring(0, 380), result.substring(0, 380));
-
- }
- */
-
- public void testCitiesByCountryHTTPInvocation() throws Throwable
- {
-
- org.apache.log4j.BasicConfigurator.configure();
- org.apache.log4j.Category.getRoot().setLevel(Level.INFO);
- org.apache.log4j.Category.getInstance("org.jgroups").setLevel(Level.INFO);
- org.apache.log4j.Category.getInstance("org.jboss.remoting").setLevel(Level.DEBUG);
- org.apache.log4j.Category.getInstance("test").setLevel(Level.DEBUG);
-
-
- String testURL = "http://www.webserviceX.NET/globalweather.asmx?op=GetCitiesByCountry";
-
- String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
- "<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" +
- " <soap:Body>\n" +
- " <GetCitiesByCountry xmlns=\"http://www.webserviceX.NET\">\n" +
- " <CountryName>Germany</CountryName>\n" +
- " </GetCitiesByCountry>\n" +
- " </soap:Body>\n" +
- "</soap:Envelope>";
-
- Map metadata = new HashMap();
- metadata.put(Client.RAW, Boolean.TRUE);
- metadata.put("TYPE", "POST");
-
- // proxy info
- //metadata.put("http.proxyHost", "ginger");
- //metadata.put("http.proxyPort", "80");
- //metadata.put("http.proxy.username", "tom");
- //metadata.put("http.proxy.password", "foobar");
-
- Properties headerProps = new Properties();
- headerProps.put("SOAPAction", "http://www.webserviceX.NET/GetCitiesByCountry");
- headerProps.put("Content-type", "text/xml; charset=UTF-8");
-
- metadata.put("HEADER", headerProps);
-
-
- HTTPInvokerClientTestCase client = new HTTPInvokerClientTestCase();
-
- String result = client.makeInvocationCall(testURL, xml, metadata);
- // 30 characters will be good enough.
- assertEquals(getExpectedCityResult().substring(0, 200), result.substring(0, 200));
-
- }
-
-
-// public void testGETHTTPInvocation() throws Throwable
-// {
-//
-// org.apache.log4j.BasicConfigurator.configure();
-// org.apache.log4j.Category.getRoot().setLevel(Level.INFO);
-// org.apache.log4j.Category.getInstance("org.jgroups").setLevel(Level.INFO);
-// org.apache.log4j.Category.getInstance("org.jboss.remoting").setLevel(Level.DEBUG);
-// org.apache.log4j.Category.getInstance("test").setLevel(Level.DEBUG);
-//
-//
-// String testURL = "http://www.gnu.org/licenses/gpl.html";
-//
-// Map metadata = new HashMap();
-// metadata.put(Client.RAW, Boolean.TRUE);
-// metadata.put("TYPE", "GET");
-//
-// HTTPInvokerClientTestCase client = new HTTPInvokerClientTestCase();
-//
-// String result = client.makeInvocationCall(testURL, null, metadata);
-// // 30 characters will be good enough.
-// assertEquals(getExpectedGETResult().substring(0, 100), result.substring(0, 100));
-//
-// }
-
- private String getExpectedGETResult()
- {
- return "<!DOCTYPE html PUBLIC \"-//IETF//DTD HTML 2.0//EN\"><HTML><HEAD><TITLE>GNU General Public License - " +
- "GNU Project - Free Software Foundation (FSF)</TITLE><LINK REV=\"made\" " +
- "HREF=\"mailto:webmasters@www.gnu.org\"><link rel=\"stylesheet\" type=\"text/css\" href=\"/gnu.css\" />" +
- "</HEAD><BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\" LINK=\"#1F00FF\" ALINK=\"#FF0000\" VLINK=\"#9900DD\">" +
- "<H1>GNU General Public License</H1><A HREF=\"/graphics/philosophicalgnu.html\"><IMG SRC=\"/graphics/philosophical-gnu-sm.jpg\" " +
- "ALT=\" [image of a Philosophical GNU] \" WIDTH=\"160\" HEIGHT=\"200\"></A><!-- Please keep this list alphabetical -->" +
- "<!-- tower, gpl.ja.html is Japanese translation of THIS PAGE, --><!-- NOT translation of GPL itself(gpl.ja.html contains the original --> " +
- "<!-- English version). So please do not remove the following. --><!-- Thanks -mhatta -->" +
- "<!-- The same for the Czech page. The entire text of GPL is not --><!-- translated on this page. Thanks Sisao -->[ " +
- "<A HREF=\"/licenses/gpl.cs.html\">Czech</A>| <A HREF=\"/licenses/gpl.html\">English</A>| <A HREF=\"/licenses/gpl.ja.html\">Japanese</A>]" +
- "<!-- It is best to not enumerate the translations here in a menu bar, --><!-- It is best to have the users follow this link, so they have the FSF' -->" +
- "<!-- explanation about translations being unofficial, etc. --><P><UL> <LI>" +
- "<A HREF=\"/licenses/gpl-violation.html\"><EM>What to do if you see a possible GPL violation</EM></A> <LI>" +
- "<A HREF=\"/licenses/translations.html\"><EM>Translations of the GPL</EM></A> <LI><A HREF=\"/licenses/gpl-faq.html\"" +
- "><EM>GPL Frequently Asked Questions</EM></A> <LI>The GNU General Public License (GPL) " +
- "<A HREF=\"/licenses/gpl.txt\">in plain text format</A> <LI>The GNU General Public License (GPL) " +
- "<A HREF=\"/licenses/gpl.texi\">in Texinfo format</A> <LI>The GNU General Public License (GPL) " +
- "<A HREF=\"/licenses/gpl-2.0.tex\">in LaTeX format</A> <li>The GNU General Public License (GPL) " +
- "<a href=\"/licenses/gpl.dbk\">as an appendix in DocBook format</a></UL><P> <HR><P><H2>Table of Contents</H2><UL> " +
- "<LI><A NAME=\"TOC1\" HREF=\"gpl.html#SEC1\">GNU GENERAL PUBLIC LICENSE</A><UL><LI><A NAME=\"TOC2\" HREF=\"gpl.html#SEC2\">Preamble</A>";
- }
-
-
- private String getExpectedWeatherResult()
- {
- return "<?xml version='1.0' encoding='UTF-8'?>" +
- "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" +
- "<SOAP-ENV:Body>" +
- "<ns1:getTempResponse xmlns:ns1=\"urn:xmethods-Temperature\" SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">" +
- "<return xsi:type=\"xsd:float\">60.0</return>" +
- "</ns1:getTempResponse>" +
- "\n" +
- "</SOAP-ENV:Body>\n" +
- "</SOAP-ENV:Envelope>";
- }
-
- private String getExpectedCityResult()
- {
- return "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" " +
- "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" +
- "<soap:Body><GetCitiesByCountryResponse xmlns=\"http://www.webserviceX.NET\"><GetCitiesByCountryResult><NewDataSet> " +
- "<Table> <Country>Germany</Country> <City>Berlin-Schoenefeld</City> </Table> <Table> " +
- "<Country>Germany</Country> <City>Dresden-Klotzsche</City> </Table> <Table> " +
- " <Country>Germany</Country> <City>Erfurt-Bindersleben</City> </Table> <Table> " +
- " <Country>Germany</Country> <City>Frankfurt / M-Flughafen</City> </Table> <Table> " +
- "<Country>Germany</Country> <City>Muenster / Osnabrueck</City> </Table> <Table> " +
- "<Country>Germany</Country> <City>Hamburg-Fuhlsbuettel</City> </Table> <Table> " +
- " <Country>Germany</Country> <City>Berlin-Tempelhof</City> </Table> <Table> " +
- "<Country>Germany</Country> <City>Koeln / Bonn</City> </Table> <Table> " +
- "<Country>Germany</Country> <City>Duesseldorf</City> </Table> <Table> " +
- " <Country>Germany</Country> <City>Munich / Riem</City> </Table> <Table> " +
- " <Country>Germany</Country> <City>Nuernberg</City> </Table> <Table> " +
- " <Country>Germany</Country> <City>Leipzig-Schkeuditz</City> </Table> <Table> " +
- " <Country>Germany</Country> <City>Saarbruecken / Ensheim</City> </Table> <Table> " +
- "<Country>Germany</Country> <City>Stuttgart-Echterdingen</City> </Table> <Table> " +
- " <Country>Germany</Country> <City>Berlin-Tegel</City> </Table> <Table> " +
- "<Country>Germany</Country> <City>Hannover</City> </Table> <Table> " +
- "<Country>Germany</Country> <City>Bremen</City> </Table> <Table> " +
- " <Country>Germany</Country> <City>Hahn</City> </Table> <Table>" +
- " <Country>Germany</Country> <City>Baden Wurttemberg, Neuostheim</";
- }
-
-// public static void main(String[] args)
-// {
-// HTTPInvokerClientTest test = new HTTPInvokerClientTest();
-// test.testHTTPInvocation();
-// }
-
-}
\ No newline at end of file
Copied: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/HTTPInvokerClientTestCase_deleted.java (from rev 3900, remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/HTTPInvokerClientTestCase.java)
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/HTTPInvokerClientTestCase_deleted.java (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/HTTPInvokerClientTestCase_deleted.java 2008-04-26 20:21:20 UTC (rev 4083)
@@ -0,0 +1,259 @@
+/*
+* 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;
+
+import junit.framework.TestCase;
+import org.apache.log4j.Level;
+import org.jboss.remoting.Client;
+import org.jboss.remoting.InvokerLocator;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * Test case that uses the HTTPInvoker client to call on two different public SOAP services (one based
+ * on Axis and the other based on .NET implementations).
+ *
+ * @author <a href="mailto:telrod@e2technologies.net">Tom Elrod</a>
+ */
+public class HTTPInvokerClientTestCase_deleted extends TestCase
+{
+ private Client client;
+
+ public void init(String httpTargetURL)
+ {
+ try
+ {
+ InvokerLocator locator = new InvokerLocator(httpTargetURL);
+ Map config = new HashMap();
+ config.put(Client.ENABLE_LEASE, "false");
+ client = new Client(locator, config);
+ client.connect();
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public String makeInvocationCall(String httpTargetURL, String payload, Map metadata) throws Throwable
+ {
+ init(httpTargetURL);
+ Object obj = client.invoke(payload, metadata);
+
+ System.out.println("invoke returned" + obj);
+
+ return (String) obj;
+ }
+
+ /* *** commented out because external site no longer available ***
+ public void testWeatherHTTPInvocation() throws Throwable
+ {
+
+ org.apache.log4j.BasicConfigurator.configure();
+ org.apache.log4j.Category.getRoot().setLevel(Level.INFO);
+ org.apache.log4j.Category.getInstance("org.jgroups").setLevel(Level.INFO);
+ org.apache.log4j.Category.getInstance("org.jboss.remoting").setLevel(Level.DEBUG);
+ org.apache.log4j.Category.getInstance("test").setLevel(Level.DEBUG);
+
+
+ String testURL = "http://services.xmethods.net:80/soap/servlet/rpcrouter";
+
+ String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+ "<soap:Envelope xmlns:mrns0=\"urn:xmethods-Temperature\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n" +
+ " <soap:Body soap:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n" +
+ " <mrns0:getTemp>\n" +
+ " <zipcode xsi:type=\"xs:string\">30106</zipcode>\n" +
+ " </mrns0:getTemp>\n" +
+ " </soap:Body>\n" +
+ "</soap:Envelope>";
+
+ Map metadata = new HashMap();
+ metadata.put(Client.RAW, Boolean.TRUE);
+ metadata.put("TYPE", "POST");
+
+ // proxy info
+ //metadata.put("http.proxyHost", "ginger");
+ //metadata.put("http.proxyPort", "80");
+ //metadata.put("http.proxy.username", "tom");
+ //metadata.put("http.proxy.password", "foobar");
+
+ Properties headerProps = new Properties();
+ headerProps.put("SOAPAction", "");
+ headerProps.put("Content-type", "text/xml; charset=UTF-8");
+
+ metadata.put("HEADER", headerProps);
+
+
+ HTTPInvokerClientTestCase client = new HTTPInvokerClientTestCase();
+
+ String result = client.makeInvocationCall(testURL, xml, metadata);
+ // don't need to comapre full string. (as actual temp value will change each time run)
+ assertEquals(getExpectedWeatherResult().substring(0, 380), result.substring(0, 380));
+
+ }
+ */
+
+ public void testCitiesByCountryHTTPInvocation() throws Throwable
+ {
+
+ org.apache.log4j.BasicConfigurator.configure();
+ org.apache.log4j.Category.getRoot().setLevel(Level.INFO);
+ org.apache.log4j.Category.getInstance("org.jgroups").setLevel(Level.INFO);
+ org.apache.log4j.Category.getInstance("org.jboss.remoting").setLevel(Level.DEBUG);
+ org.apache.log4j.Category.getInstance("test").setLevel(Level.DEBUG);
+
+
+ String testURL = "http://www.webserviceX.NET/globalweather.asmx?op=GetCitiesByCountry";
+
+ String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
+ "<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" +
+ " <soap:Body>\n" +
+ " <GetCitiesByCountry xmlns=\"http://www.webserviceX.NET\">\n" +
+ " <CountryName>Germany</CountryName>\n" +
+ " </GetCitiesByCountry>\n" +
+ " </soap:Body>\n" +
+ "</soap:Envelope>";
+
+ Map metadata = new HashMap();
+ metadata.put(Client.RAW, Boolean.TRUE);
+ metadata.put("TYPE", "POST");
+
+ // proxy info
+ //metadata.put("http.proxyHost", "ginger");
+ //metadata.put("http.proxyPort", "80");
+ //metadata.put("http.proxy.username", "tom");
+ //metadata.put("http.proxy.password", "foobar");
+
+ Properties headerProps = new Properties();
+ headerProps.put("SOAPAction", "http://www.webserviceX.NET/GetCitiesByCountry");
+ headerProps.put("Content-type", "text/xml; charset=UTF-8");
+
+ metadata.put("HEADER", headerProps);
+
+
+ HTTPInvokerClientTestCase_deleted client = new HTTPInvokerClientTestCase_deleted();
+
+ String result = client.makeInvocationCall(testURL, xml, metadata);
+ // 30 characters will be good enough.
+ assertEquals(getExpectedCityResult().substring(0, 200), result.substring(0, 200));
+
+ }
+
+
+// public void testGETHTTPInvocation() throws Throwable
+// {
+//
+// org.apache.log4j.BasicConfigurator.configure();
+// org.apache.log4j.Category.getRoot().setLevel(Level.INFO);
+// org.apache.log4j.Category.getInstance("org.jgroups").setLevel(Level.INFO);
+// org.apache.log4j.Category.getInstance("org.jboss.remoting").setLevel(Level.DEBUG);
+// org.apache.log4j.Category.getInstance("test").setLevel(Level.DEBUG);
+//
+//
+// String testURL = "http://www.gnu.org/licenses/gpl.html";
+//
+// Map metadata = new HashMap();
+// metadata.put(Client.RAW, Boolean.TRUE);
+// metadata.put("TYPE", "GET");
+//
+// HTTPInvokerClientTestCase client = new HTTPInvokerClientTestCase();
+//
+// String result = client.makeInvocationCall(testURL, null, metadata);
+// // 30 characters will be good enough.
+// assertEquals(getExpectedGETResult().substring(0, 100), result.substring(0, 100));
+//
+// }
+
+ private String getExpectedGETResult()
+ {
+ return "<!DOCTYPE html PUBLIC \"-//IETF//DTD HTML 2.0//EN\"><HTML><HEAD><TITLE>GNU General Public License - " +
+ "GNU Project - Free Software Foundation (FSF)</TITLE><LINK REV=\"made\" " +
+ "HREF=\"mailto:webmasters@www.gnu.org\"><link rel=\"stylesheet\" type=\"text/css\" href=\"/gnu.css\" />" +
+ "</HEAD><BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\" LINK=\"#1F00FF\" ALINK=\"#FF0000\" VLINK=\"#9900DD\">" +
+ "<H1>GNU General Public License</H1><A HREF=\"/graphics/philosophicalgnu.html\"><IMG SRC=\"/graphics/philosophical-gnu-sm.jpg\" " +
+ "ALT=\" [image of a Philosophical GNU] \" WIDTH=\"160\" HEIGHT=\"200\"></A><!-- Please keep this list alphabetical -->" +
+ "<!-- tower, gpl.ja.html is Japanese translation of THIS PAGE, --><!-- NOT translation of GPL itself(gpl.ja.html contains the original --> " +
+ "<!-- English version). So please do not remove the following. --><!-- Thanks -mhatta -->" +
+ "<!-- The same for the Czech page. The entire text of GPL is not --><!-- translated on this page. Thanks Sisao -->[ " +
+ "<A HREF=\"/licenses/gpl.cs.html\">Czech</A>| <A HREF=\"/licenses/gpl.html\">English</A>| <A HREF=\"/licenses/gpl.ja.html\">Japanese</A>]" +
+ "<!-- It is best to not enumerate the translations here in a menu bar, --><!-- It is best to have the users follow this link, so they have the FSF' -->" +
+ "<!-- explanation about translations being unofficial, etc. --><P><UL> <LI>" +
+ "<A HREF=\"/licenses/gpl-violation.html\"><EM>What to do if you see a possible GPL violation</EM></A> <LI>" +
+ "<A HREF=\"/licenses/translations.html\"><EM>Translations of the GPL</EM></A> <LI><A HREF=\"/licenses/gpl-faq.html\"" +
+ "><EM>GPL Frequently Asked Questions</EM></A> <LI>The GNU General Public License (GPL) " +
+ "<A HREF=\"/licenses/gpl.txt\">in plain text format</A> <LI>The GNU General Public License (GPL) " +
+ "<A HREF=\"/licenses/gpl.texi\">in Texinfo format</A> <LI>The GNU General Public License (GPL) " +
+ "<A HREF=\"/licenses/gpl-2.0.tex\">in LaTeX format</A> <li>The GNU General Public License (GPL) " +
+ "<a href=\"/licenses/gpl.dbk\">as an appendix in DocBook format</a></UL><P> <HR><P><H2>Table of Contents</H2><UL> " +
+ "<LI><A NAME=\"TOC1\" HREF=\"gpl.html#SEC1\">GNU GENERAL PUBLIC LICENSE</A><UL><LI><A NAME=\"TOC2\" HREF=\"gpl.html#SEC2\">Preamble</A>";
+ }
+
+
+ private String getExpectedWeatherResult()
+ {
+ return "<?xml version='1.0' encoding='UTF-8'?>" +
+ "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" +
+ "<SOAP-ENV:Body>" +
+ "<ns1:getTempResponse xmlns:ns1=\"urn:xmethods-Temperature\" SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">" +
+ "<return xsi:type=\"xsd:float\">60.0</return>" +
+ "</ns1:getTempResponse>" +
+ "\n" +
+ "</SOAP-ENV:Body>\n" +
+ "</SOAP-ENV:Envelope>";
+ }
+
+ private String getExpectedCityResult()
+ {
+ return "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" " +
+ "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" +
+ "<soap:Body><GetCitiesByCountryResponse xmlns=\"http://www.webserviceX.NET\"><GetCitiesByCountryResult><NewDataSet> " +
+ "<Table> <Country>Germany</Country> <City>Berlin-Schoenefeld</City> </Table> <Table> " +
+ "<Country>Germany</Country> <City>Dresden-Klotzsche</City> </Table> <Table> " +
+ " <Country>Germany</Country> <City>Erfurt-Bindersleben</City> </Table> <Table> " +
+ " <Country>Germany</Country> <City>Frankfurt / M-Flughafen</City> </Table> <Table> " +
+ "<Country>Germany</Country> <City>Muenster / Osnabrueck</City> </Table> <Table> " +
+ "<Country>Germany</Country> <City>Hamburg-Fuhlsbuettel</City> </Table> <Table> " +
+ " <Country>Germany</Country> <City>Berlin-Tempelhof</City> </Table> <Table> " +
+ "<Country>Germany</Country> <City>Koeln / Bonn</City> </Table> <Table> " +
+ "<Country>Germany</Country> <City>Duesseldorf</City> </Table> <Table> " +
+ " <Country>Germany</Country> <City>Munich / Riem</City> </Table> <Table> " +
+ " <Country>Germany</Country> <City>Nuernberg</City> </Table> <Table> " +
+ " <Country>Germany</Country> <City>Leipzig-Schkeuditz</City> </Table> <Table> " +
+ " <Country>Germany</Country> <City>Saarbruecken / Ensheim</City> </Table> <Table> " +
+ "<Country>Germany</Country> <City>Stuttgart-Echterdingen</City> </Table> <Table> " +
+ " <Country>Germany</Country> <City>Berlin-Tegel</City> </Table> <Table> " +
+ "<Country>Germany</Country> <City>Hannover</City> </Table> <Table> " +
+ "<Country>Germany</Country> <City>Bremen</City> </Table> <Table> " +
+ " <Country>Germany</Country> <City>Hahn</City> </Table> <Table>" +
+ " <Country>Germany</Country> <City>Baden Wurttemberg, Neuostheim</";
+ }
+
+// public static void main(String[] args)
+// {
+// HTTPInvokerClientTest test = new HTTPInvokerClientTest();
+// test.testHTTPInvocation();
+// }
+
+}
\ No newline at end of file
16 years, 7 months
JBoss Remoting SVN: r4082 - remoting2/branches/2.x/docs.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-26 16:17:38 -0400 (Sat, 26 Apr 2008)
New Revision: 4082
Modified:
remoting2/branches/2.x/docs/README.txt
Log:
JBREM-968: Added release notes for 2.4.0.CR2.
Modified: remoting2/branches/2.x/docs/README.txt
===================================================================
--- remoting2/branches/2.x/docs/README.txt 2008-04-26 18:05:24 UTC (rev 4081)
+++ remoting2/branches/2.x/docs/README.txt 2008-04-26 20:17:38 UTC (rev 4082)
@@ -29,7 +29,27 @@
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 Notes - JBoss Remoting - Version 2.4.0.CR2 - Text format
+Bug
+ * [JBREM-947] - ConnectionValidator hangs when server dies
+ * [JBREM-951] - CLONE [JBREM-942] - A deadlock encountered on ConnectionValidator
+ * [JBREM-955] - CLONE [JBREM-954] - InterruptException should not be rethrown as CannotConnectionException
+ * [JBREM-956] - Make LeasePinger timeout separately configurable
+ * [JBREM-966] - CLONE [JBREM-965] - Fix PortUtil.getRandomStartingPort()
+
+Release
+
+ * [JBREM-968] - Release 2.4.0.CR2
+
+Task
+
+ * [JBREM-934] - Put code subject to a security manager in privileged blocks
+ * [JBREM-953] - CLONE [JBREM-945] - Allow ServerThread to keep running after SocketTImeoutException
+ * [JBREM-967] - Assure version compatibility with earlier versions of Remoting
+ * [JBREM-969] - Run soak test
+
==========================================================================================================
Release Notes - JBoss Remoting - Version 2.4.0.CR1 (Pinto)
Bug
16 years, 7 months
JBoss Remoting SVN: r4081 - remoting2/branches/2.x/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-26 14:05:24 -0400 (Sat, 26 Apr 2008)
New Revision: 4081
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.java
Log:
JBREM-947: Fixed potential NullPointerException in WaitOnConnectionCheckTimerTask.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.java 2008-04-25 21:30:31 UTC (rev 4080)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.java 2008-04-26 18:05:24 UTC (rev 4081)
@@ -660,8 +660,17 @@
{
log.debug(this + " detected connection failure: stopping LeasePinger");
MicroRemoteClientInvoker invoker = (MicroRemoteClientInvoker) client.getInvoker();
- invoker.terminateLease(null, client.getDisconnectTimeout());
- log.debug(this + " shut down lease pinger");
+
+ if (invoker != null)
+ {
+ invoker.terminateLease(null, client.getDisconnectTimeout());
+ log.debug(ConnectionValidator.this + " shut down lease pinger");
+ }
+ else
+ {
+ log.debug(ConnectionValidator.this + " unable to shut down lease pinger: client must have shut down");
+ }
+
cancel();
}
}
16 years, 7 months
JBoss Remoting SVN: r4080 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/invoker.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-25 17:30:31 -0400 (Fri, 25 Apr 2008)
New Revision: 4080
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/invoker/LocalInvokerTestCase.java
Log:
JBREM-930: Wait 60000 ms after unsuccessful attempt to recreate Connector.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/invoker/LocalInvokerTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/invoker/LocalInvokerTestCase.java 2008-04-25 08:24:09 UTC (rev 4079)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/invoker/LocalInvokerTestCase.java 2008-04-25 21:30:31 UTC (rev 4080)
@@ -278,6 +278,8 @@
}
catch(Exception e)
{
+ log.info("error - will try again: " + e.getMessage());
+ Thread.sleep(60000);
}
}
16 years, 7 months
JBoss Remoting SVN: r4079 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/interrupt.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-25 04:24:09 -0400 (Fri, 25 Apr 2008)
New Revision: 4079
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/interrupt/MockInvokerInterruptTestCase.java
Log:
JBREM-955: Another unit test (from Galder).
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/interrupt/MockInvokerInterruptTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/interrupt/MockInvokerInterruptTestCase.java (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/interrupt/MockInvokerInterruptTestCase.java 2008-04-25 08:24:09 UTC (rev 4079)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.socket.interrupt;
+
+import junit.framework.TestCase;
+
+import org.apache.log4j.Logger;
+import org.jboss.remoting.CannotConnectException;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.marshal.Marshaller;
+import org.jboss.remoting.marshal.UnMarshaller;
+import org.jboss.remoting.transport.socket.MicroSocketClientInvoker;
+import org.jboss.remoting.transport.socket.SocketWrapper;
+
+import EDU.oswego.cs.dl.util.concurrent.CountDown;
+
+/**
+ * Unit test for JBREM-955.
+ *
+ * @author <a href="mailto:galder.zamarreno@jboss.com">Galder Zamarreno</a>
+ */
+public class MockInvokerInterruptTestCase extends TestCase
+{
+ private static final Logger log = Logger.getLogger(MockInvokerInterruptTestCase.class);
+
+ public void test000() throws Throwable
+ {
+ InvokerLocator il = new InvokerLocator("unittest", "127.0.0.1", 9999, "mock", null);
+ CountDown startGate = new CountDown(1);
+ MockMicroSocketClientInvoker ci = new MockMicroSocketClientInvoker(il, startGate);
+ InvocationRequest ir = new InvocationRequest("", "", null, null, null, il);
+
+ Runnable interrupterRunnable = new ThreadInterrupter(Thread.currentThread(), startGate);
+ Thread interrupter = new Thread(interrupterRunnable);
+ interrupter.start();
+
+ ci.setMaxPoolSize(0);
+ ci.connect();
+ try
+ {
+ ci.invoke(ir);
+ }
+ catch(CannotConnectException cce)
+ {
+ log.error("We interrupted the connection, a more meaningul exception should be thrown");
+ throw cce;
+ }
+ catch (RuntimeException re)
+ {
+ assertTrue(re.getCause() instanceof InterruptedException);
+ }
+ }
+
+ class MockMicroSocketClientInvoker extends MicroSocketClientInvoker
+ {
+ private CountDown startGate;
+
+ public MockMicroSocketClientInvoker(InvokerLocator locator, CountDown start)
+ {
+ super(locator);
+ startGate = start;
+ }
+
+ public void setMaxPoolSize(int maxPoolSize)
+ {
+ this.maxPoolSize = maxPoolSize;
+ }
+
+ protected SocketWrapper getConnection(Marshaller marshaller, UnMarshaller unmarshaller,
+ boolean tryPool, int timeAllowed)
+ throws Exception
+ {
+ log.info("Request a connection but before that, let's open the start gate");
+ startGate.release();
+ return super.getConnection(marshaller, unmarshaller, true, timeAllowed);
+ }
+ }
+
+ class ThreadInterrupter implements Runnable
+ {
+ private Thread threadToInterrupt;
+
+ private CountDown startGate;
+
+ ThreadInterrupter(Thread thread, CountDown start)
+ {
+ threadToInterrupt = thread;
+ startGate = start;
+ }
+
+ public void run()
+ {
+ try
+ {
+ log.info("Wait for start gate to be opened");
+ startGate.acquire();
+
+ log.info("Start gate opened, let's sleep briefly...");
+ Thread.sleep(200);
+
+ log.info("Sleep finished, interrupt the target thread");
+ threadToInterrupt.interrupt();
+ }
+ catch (InterruptedException e)
+ {
+ log.error("Error", e);
+ }
+ }
+
+ }
+}
16 years, 7 months