harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r406944 [24/30] - in /incubator/harmony/enhanced/classlib/trunk/modules/rmi2: ./ build/ doc/ doc/testing/ doc/testing/rmi http tunneling/ doc/testing/rmi http tunneling/Results - ITC/ doc/testing/rmi http tunneling/Results - SUN/ doc/testin...
Date Tue, 16 May 2006 13:52:07 GMT
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/remoteexport/PortableUnicastRemoteObject.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/remoteexport/PortableUnicastRemoteObject.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/remoteexport/PortableUnicastRemoteObject.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/remoteexport/PortableUnicastRemoteObject.java Tue May 16 06:51:00 2006
@@ -0,0 +1,116 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the License);
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an AS IS BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package ar.org.fitc.test.rmi.integration.fase2.serverExecutor.remoteexport;
+
+import java.rmi.NotBoundException;
+import java.rmi.RemoteException;
+import java.rmi.server.RMIClientSocketFactory;
+import java.rmi.server.RMIServerSocketFactory;
+import java.rmi.server.RemoteStub;
+
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.executor.ClientExecutor;
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.executor.PropagableExecutor;
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.executor.ServerExecutor;
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.interfaces.ITCRemote;
+
+/**
+ * Implements static methods for export an unexport objects.
+ * 
+ * @author Jorge Rafael
+ * @author Marcelo Arcidiacono
+ * 
+ * @version 1.0
+ */
+public class PortableUnicastRemoteObject {
+
+	/**
+	 * Default constructor.
+	 */
+	public PortableUnicastRemoteObject() {
+		super();
+	}
+
+	/**
+	 * Defines a <code>PropagableExecutor</code> object and assigns it
+	 * a <code>ClentExecutor</code>.
+	 *  
+	 * @param serverHost the host of the Server
+	 * @param obj an <code>ITCRemote</code> object
+	 * @return a <code>RemoteStub</code> 
+	 * @throws RemoteException if the remote operation fails
+	 * @throws NotBoundException if name is not currently bound 
+	 */
+	static public RemoteStub exportObject(String serverHost, ITCRemote obj) throws RemoteException, NotBoundException {
+		PropagableExecutor client;
+		client = ClientExecutor.getExecutor(serverHost);
+		ServerExecutor serv = new ExportServiceExecutor();		
+		return (RemoteStub) client.execute(serv, 0, (Integer) 1, obj);
+	}
+	
+	/**
+	 * Defines a <code>PropagableExecutor</code> object and assigns it
+	 * a <code>ClentExecutor</code>.
+	 *  
+	 * @param serverHost the host of the Server
+	 * @param obj an <code>ITCRemote</code> object
+	 * @param port the specified port
+	 * @return an <code>ITCRemote</code> object
+	 * @throws RemoteException if the remote operation fails
+	 * @throws NotBoundException if name is not currently bound 
+	 */
+	static public ITCRemote exportObject(String serverHost, ITCRemote obj, int port) throws RemoteException, NotBoundException {
+		PropagableExecutor client;
+		client = ClientExecutor.getExecutor(serverHost);
+		ServerExecutor serv = new ExportServiceExecutor();		
+		return (ITCRemote) client.execute(serv, 0, (Integer) 2, obj, port);
+	}
+
+	/**
+	 * Defines a <code>PropagableExecutor</code> object and assigns it
+	 * a <code>ClentExecutor</code>.
+	 * 
+	 * @param serverHost the host of the Server
+	 * @param obj an <code>ITCRemote</code> object
+	 * @param port the specified port
+	 * @param csf the specified <code>ClientSocketFactory</code>
+	 * @param ssf the specified <code>ServerSocketFactory</code>
+	 * @return an <code>ITCRemote</code> object
+	 * @throws RemoteException if the remote operation fails
+	 * @throws NotBoundException if name is not currently bound 
+	 */
+	static public ITCRemote exportObject(String serverHost, ITCRemote obj, int port, RMIClientSocketFactory csf,
+            RMIServerSocketFactory ssf) throws RemoteException, NotBoundException {
+		PropagableExecutor client;
+		client = ClientExecutor.getExecutor(serverHost);
+		ServerExecutor serv = new ExportServiceExecutor();
+		return (ITCRemote) client.execute(serv, 0, (Integer) 4, obj, port, csf, ssf);
+	}
+
+	/**
+	 * Unexport a specified <code>ITCRemote</code> object. 
+	 * 
+	 * @param obj the specified <code>ITCRemote</code> object
+	 * @param force if <code>true</code>, unexports the object even 
+	 * if there are pending or in-progress calls; if <code>false</code>, 
+	 * only unexports the object if there are no pending or in-progress 
+	 * calls 
+	 * @return true if operation is successful, false otherwise
+	 * @throws RemoteException if the remote operation fails
+	 */
+	static public boolean unexportObject(ITCRemote obj, boolean force) throws RemoteException {
+		return obj.clean(force);
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/remoteexport/PortableUnicastRemoteObject.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/DGCTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/DGCTestCase.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/DGCTestCase.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/DGCTestCase.java Tue May 16 06:51:00 2006
@@ -0,0 +1,236 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the License);
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an AS IS BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package ar.org.fitc.test.rmi.integration.fase2.serverExecutor.test;
+
+import java.lang.ref.WeakReference;
+import java.rmi.NotBoundException;
+import java.rmi.RemoteException;
+import java.rmi.server.UnicastRemoteObject;
+
+import junit.framework.AssertionFailedError;
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.executor.ServerExecutor;
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.interfaces.ITCRemote;
+import ar.org.fitc.test.rmi.integration.fase2.serverExecutor.LogRemoteImpl;
+import ar.org.fitc.test.rmi.integration.fase2.serverExecutor.MoveRemoteObject;
+import ar.org.fitc.test.rmi.integration.fase2.serverExecutor.interfaces.LogRemote;
+import ar.org.fitc.test.rmi.integration.fase2.serverExecutor.remoteexport.PortableUnicastRemoteObject;
+
+
+/**
+ * Testing class for Distributed Garbage Collector.
+ * 
+ * @author Jorge Rafael
+ * @author Marcelo Arcidiacono
+ * 
+ * @version 1.0
+ */
+public class DGCTestCase extends ExecutorTestCase {
+
+	/**
+	 * A <code>LogRemoteImpl</code>.
+	 */
+	public LogRemoteImpl remote;
+
+	/**
+	 * A <code>ServerExecutor</code>.
+	 */
+	public ServerExecutor serv;
+
+	/**
+	 * A <code>WeakReference</code>.
+	 */
+	public WeakReference wref;
+
+	/**
+	 * A <code>LogReRemote</code>.
+	 */
+	public LogRemote stub;
+
+	
+	/**
+	 * Default constructor.
+	 *
+	 */
+	public DGCTestCase() {
+		super();
+	}
+
+	/**
+	 * Constructs a <code>DGCTestCase</code> with a name. 
+	 * 
+	 * @param arg0 a name.
+	 */
+	public DGCTestCase(String arg0) {
+		super(arg0);
+	}
+
+	/**
+	 * Wait for a reference.
+	 * 
+	 * @param ref a specified <code>WeakReference</code>
+	 */
+	@SuppressWarnings("unused")
+	private void waitRef(WeakReference ref) {
+		System.out.print("waiting");
+		try {
+			for (int i = 0; i < 40; i++) {
+				System.out.print(".");
+				try {			
+					Thread.sleep(5000);
+				} catch (InterruptedException e) {	}
+				assertNotNull(wref);
+			}
+		} catch (AssertionFailedError e) {
+		}
+		System.out.println();
+	}
+	
+	/**
+	 * Exports a remote object. 
+	 * 
+	 * @throws Exception if any exception occurs
+	 */
+	@SuppressWarnings("unchecked")
+	protected void setUp() throws Exception {
+		remote = new LogRemoteImpl();
+		stub = (LogRemote) UnicastRemoteObject.exportObject(remote, 0);
+		// Container and remote execution
+		serv = new MoveRemoteObject(remote);
+		wref = new WeakReference(remote);
+		super.setUp();
+	}
+
+	/**
+	 * Unexport a remote object.
+	 * 
+	 * @throws Exception if any exception occurs 
+	 */
+	protected void tearDown() throws Exception {
+		super.tearDown();
+		if (wref.get() != null) {
+			UnicastRemoteObject.unexportObject((ITCRemote) wref.get(), true);
+		}
+	}
+
+	/**
+	 * This test copies -through all servers- the reference (stub) 
+	 * of an exported remote object. The life time of these objects 
+	 * is limited, they work and then they are deleted. All local 
+	 * strong references to the object are deleted and we expect 
+	 * that the DGC collect the remote object.
+	 * 
+	 * @throws RemoteException if any remote operation fails
+	 * @throws NotBoundException if the name is not currently bound 
+	 */
+	@SuppressWarnings("unchecked")
+	public void testMovingReference001() throws RemoteException,
+			NotBoundException {
+
+		executor.execute(hosts, serv, 10);
+
+		// Obtains s WeakreRerence and clean all local reference
+		remote = null;
+		serv = null;
+		// a local stub not change the DGC behavior. 
+		// stub = null;
+
+		// Force GC in all clean
+		// GCRemote.forceRemoteGC();
+		waitRef(wref);
+		assertNull("the reference is not null",wref);
+	}
+
+	/**
+	 * Exports a non exported object that has a reference to an 
+	 * exported object in an external host. If all local strong 
+	 * references are deleted and only the exported object in the 
+	 * external host has a reference to the local object, then the 
+	 * local object is not collected.
+	 * 
+	 * @throws RemoteException if any remote operation fails
+	 * @throws NotBoundException if the name is not currently bound 
+	 */
+	public void testMovingReference002() throws RemoteException, NotBoundException {
+		{
+		LogRemoteImpl remote2 = new LogRemoteImpl();
+		remote2.out = remote;
+		stub = (LogRemote) PortableUnicastRemoteObject.exportObject(
+				hosts[0], remote2, 0);
+		}
+		remote = null; serv = null;
+		assertNotNull("The reference is steal hear",wref);
+		stub = null;
+		waitRef(wref);
+		assertNull("The reference is steal hear",wref);
+	}
+	
+	/**
+	 * Makes a cyclic reference using the stub of the remote object. 
+	 * The specified objects are in the same host. The DGC will detect 
+	 * the cyclic reference and collect them.
+	 * 
+	 * @throws RemoteException if any remote operation fails
+	 * @throws NotBoundException if the name is not currently bound 
+	 */
+	public void testCyclicReference001() throws RemoteException,
+			NotBoundException {
+		{
+			LogRemoteImpl remote2 = new LogRemoteImpl();
+
+			LogRemoteImpl remote3 = new LogRemoteImpl();
+			remote3.out = stub;
+			remote2.out = (LogRemote) UnicastRemoteObject.exportObject(remote3, 0);
+			remote.out = (LogRemote) UnicastRemoteObject.exportObject(remote2, 0);
+
+		}
+		testMovingReference001();
+	}
+
+	/**
+	 * Makes a cyclic reference to the remote objects that they are 
+	 * in different hosts. The DGC not will detect the cyclic reference 
+	 * and not collect them.
+	 * 
+	 * @throws RemoteException if any remote operation fails
+	 * @throws NotBoundException if the name is not currently bound
+	 */
+	public void testCyclicReference002() throws RemoteException,
+			NotBoundException {
+		{
+			LogRemoteImpl remote2 = new LogRemoteImpl();
+			LogRemoteImpl remote3 = new LogRemoteImpl();
+			remote3.out = remote;
+			remote2.out = (LogRemote) PortableUnicastRemoteObject.exportObject(
+					hosts[1], remote3, 0);
+			remote.out = (LogRemote) PortableUnicastRemoteObject.exportObject(
+					hosts[0], remote2, 0);
+
+		}
+		executor.execute(hosts, serv, 10);
+
+		// Obtains s WeakreRerence and clean all local reference
+		remote = null;
+		serv = null;
+		// a local stub not change the DGC behavior.  
+		// stub = null;
+
+		// Force GC in all clean
+		// GCRemote.forceRemoteGC();
+		waitRef(wref);
+		assertNotNull("the reference mustn't clean",wref);
+		
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/DGCTestCase.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/ExecutorTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/ExecutorTestCase.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/ExecutorTestCase.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/ExecutorTestCase.java Tue May 16 06:51:00 2006
@@ -0,0 +1,80 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the License);
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an AS IS BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package ar.org.fitc.test.rmi.integration.fase2.serverExecutor.test;
+
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.executor.ClientExecutor;
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.executor.PropagableExecutor;
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.executor.ReportIPServer;
+
+/**
+ * Testing class for a <code>PropagableExecutor</code>. 
+ * 
+ * @author Jorge Rafael
+ * @author Marcelo Arcidiacono
+ * 
+ * @version 1.0
+ */
+public class ExecutorTestCase extends ITCTestCase {
+
+	/**
+	 * An arrays of hosts. 
+	 */
+	public String[] hosts;
+	
+	/**
+	 * A <code>PropagableExecutor</code>.  
+	 */
+	public PropagableExecutor executor;
+	
+	/**
+	 * Default constructor.
+	 *
+	 */
+	public ExecutorTestCase() {
+		super();
+	}
+
+	/**
+	 * Constructs a <code>ExecutorTestCase</code> with a name. 
+	 * 
+	 * @param arg0 a name.
+	 */
+	public ExecutorTestCase(String arg0) {
+		super(arg0);
+	}
+
+	/**
+	 * Obtains a <code>PropagableExecutor</code> for a reported host.
+	 * 
+	 * @throws Exception if any exception occurs
+	 */
+	protected void setUp() throws Exception {
+		hosts = ReportIPServer.getit();
+		executor = ClientExecutor.getExecutor(hosts[0]);
+		super.setUp();
+	}
+	 
+	/**
+	 * Simple implementation.
+	 * 
+	 * @throws Exception if any exception occurs
+	 */
+	protected void tearDown() throws Exception {
+		super.tearDown();
+		hosts = null;
+		executor = null;
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/ExecutorTestCase.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/ITCTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/ITCTestCase.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/ITCTestCase.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/ITCTestCase.java Tue May 16 06:51:00 2006
@@ -0,0 +1,240 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the License);
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an AS IS BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package ar.org.fitc.test.rmi.integration.fase2.serverExecutor.test;
+
+import java.lang.ref.WeakReference;
+import java.lang.reflect.Method;
+import java.rmi.RemoteException;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.rmi.server.ExportException;
+import java.util.logging.Logger;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestListener;
+import junit.framework.TestResult;
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.Net;
+
+/**
+ * Generates a log.
+ * 
+ * @author Jorge Rafael
+ * @author Marcelo Arcidiacono
+ *
+ * @version 1.0
+ */
+class Listener implements TestListener {
+
+	/**
+	 * Prints a message that receive as parameter.
+	 * 
+	 * @param msg a message
+	 */
+	private void printMSG(String msg) {
+		if (msg != null && !msg.startsWith("Failed with:")) {
+			msg = "Failed with: " +msg;
+		}
+		System.out.println("\t\t" + msg);
+	}
+	
+	/**
+	 * Adds an error trace.
+	 * 
+	 * @param arg a testing argument
+	 * @param arg1 a throwable argument
+	 */
+	public void addError(Test arg, Throwable arg1) {
+		//arg1.printStackTrace();
+		printMSG(arg1.getMessage());
+	}
+	  
+	/**
+	 * Adds a failure trace.
+	 * 
+	 * @param arg a testing argument
+	 * @param arg1 an assertion failure error
+	 */
+	public void addFailure(Test arg, AssertionFailedError arg1) {
+		//arg1.printStackTrace();
+		printMSG(arg1.getMessage());
+	}
+	  
+	/**
+	 * Indicates the end of the test
+	 * 
+	 * @param arg testing argument
+	 */
+	public void endTest(Test arg) {		
+	}
+	
+	/**
+	 * Indicates the start of the test
+	 * 
+	 * @param arg testing argument
+	 * */
+	public void startTest(Test arg) {
+	}
+}
+
+/**
+ * Testing class for <code>WeakReference</code>'s.
+ * 
+ * @author Jorge Rafael
+ * @author Marcelo Arcidiacono
+ *
+ */
+public class ITCTestCase extends TestCase {
+	
+	/**
+	 * For log purpose.
+	 */
+	transient final protected static Logger log = Logger.getLogger("ar.org.fitc.test.rmi.integration.fase2.test");
+
+	/**
+	 * The remote interface to a simple remote object. 
+	 */
+	private static Registry registry;
+	
+	/**
+	 * If registry is null, creates it. 
+	 *
+	 */
+	public synchronized static void initRegistry() {
+		if (registry == null) {
+			try {
+				try {
+					registry = LocateRegistry.createRegistry(Net.getRegistryPort());
+				} catch (ExportException e) {
+					registry = LocateRegistry.getRegistry(Net.getRegistryPort());
+				}
+		    } catch (RemoteException e) {
+		        e.printStackTrace();
+		    }
+		}
+	}
+		
+	/**
+	 * Creates a log.
+	 *  
+	 */
+	public TestResult run() {
+		System.out.println(this.getClass() + " start");
+		TestResult r = createResult();
+		r.addListener(new Listener());
+		for (Method m : this.getClass().getMethods()) {
+			String name = m.getName(); 
+			if (name.startsWith("test") && m.getParameterTypes().length == 0) {
+					System.out.println("\t" + name);
+					setName(name);
+					run(r);		
+			}
+		}
+		return r;
+	}
+
+	/**
+     * Default constructor.
+     *
+     */
+	public ITCTestCase() {
+		super();
+	}
+	
+	/**
+	 * Constructs a <code>ITCTestCase</code> with a name. 
+	 * 
+	 * @param arg0 a name.
+	 */
+	public ITCTestCase(String arg0) {
+		super(arg0);
+		//TODO puesto por conveniencia temporal...
+		// permite ejecutar los test desde el plugin de eclipse. 
+		//sacra cuendo el proyecto este en marcha
+		System.setProperty("java.rmi.server.codebase",
+		"ftp://proftp:1@10.100.2.230/");
+		System.setProperty("java.rmi.server.hostname", "10.100.2.230");
+	}
+	
+	/**
+	 * Creates a new <code>WeakReference</code> and forces the 
+	 * garbage collector 
+	 *
+	 */
+	@SuppressWarnings("unchecked")
+	public static void forceGC() {
+		WeakReference ref = new WeakReference(new Integer(234523));
+		while (ref.get() != null) {
+			System.gc();
+		}
+	}
+	
+	/**
+	 * Creates a new <code>WeakReference</code> and forces the 
+	 * garbage collector.
+	 *  
+	 * @param ref the specified <code>WeakReference</code>
+	 * @param times the number of executions 
+	 */
+	public static void forceGC(WeakReference ref, int times) {
+		for (int i = times; ref.get() != null || i ==0; i--) {
+			System.gc();
+		}
+	}
+	
+	/**
+	 * Verifies the <code>WeakReference</code>.
+	 * 
+	 * @param ref the specified <code>WeakReference</code>
+	 */
+	public static void assertNull(WeakReference ref) {
+		forceGC();
+		assertNull(ref.get());
+	}
+
+	/**
+	 * Verifies the <code>WeakReference</code>.
+	 * 
+	 * @param ref the specified <code>WeakReference</code>
+	 * @param message if this assert fail this message'll be tell 
+	 */
+	public static void assertNull(String message, WeakReference ref) {
+		forceGC();
+		assertNull(message, ref.get());
+	}
+	
+	/**
+	 * Verifies the <code>WeakReference</code>.
+	 * 
+	 * @param ref the specified <code>WeakReference</code>
+	 */
+	public static void assertNotNull(WeakReference ref) {
+		forceGC();
+		assertNotNull(ref.get());
+	}
+	
+	/**
+	 * Verifies the <code>WeakReference</code>.
+	 * 
+	 * @param ref the specified <code>WeakReference</code>
+	 * @param message if this assert fail this message'll be tell
+	 */
+	public static void assertNotNull(String message, WeakReference ref) {
+		forceGC();
+		assertNotNull(message, ref.get());
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/ITCTestCase.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/PortableTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/PortableTestCase.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/PortableTestCase.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/PortableTestCase.java Tue May 16 06:51:00 2006
@@ -0,0 +1,132 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the License);
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an AS IS BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package ar.org.fitc.test.rmi.integration.fase2.serverExecutor.test;
+
+import java.rmi.NotBoundException;
+import java.rmi.RemoteException;
+
+import junit.framework.AssertionFailedError;
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.executor.ReportIPServer;
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.executor.ServerExecutor;
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.interfaces.ITCRemote;
+import ar.org.fitc.test.rmi.integration.fase2.serverExecutor.AbstractITCRemote;
+import ar.org.fitc.test.rmi.integration.fase2.serverExecutor.remoteexport.ExecutorGetClientHost;
+import ar.org.fitc.test.rmi.integration.fase2.serverExecutor.remoteexport.PortableUnicastRemoteObject;
+
+
+/**
+ * Testing class for verifies references to exported objects.
+ * 
+ * @author Jorge Rafael
+ * @author Marcelo Arcidiacono
+ *
+ * @version 1.0
+ */
+public class PortableTestCase extends ITCTestCase {
+	
+	/**
+	 * An array of hosts.
+	 */
+	public String[] hosts;
+	
+	/**
+	 * Default constructor
+	 *
+	 */
+	public PortableTestCase() {
+		super();
+	}
+
+	/**
+	 * Constructs a <code>PortableTestCase</code> with a name. 
+	 * 
+	 * @param arg0 a name.
+	 */
+	public PortableTestCase(String arg0) {
+		super(arg0);
+	}
+
+	/**
+	 * Assigns an IP reported.
+	 *  
+	 * @throws Exception if any exception occurs 
+	 */
+	protected void setUp() throws Exception {
+		hosts = ReportIPServer.getit();
+		super.setUp();
+	}
+
+	/**
+	 * Simple implementation.
+	 * 
+	 * @throws Exception if any exception occurs
+	 */
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+	
+	/**
+	 * An object is exported to an external host and it is used 
+	 * through his reference. Then, the object is unexported and 
+	 * we can verify that cannot use the reference
+	 * 
+	 * @throws RemoteException if the exportation fails
+	 * @throws NotBoundException if the name is not currently bound 
+	 */
+	
+	public void testPortar() throws RemoteException, NotBoundException {
+		ITCRemote r = new AbstractITCRemote();
+		ITCRemote stub = PortableUnicastRemoteObject.exportObject(hosts[0], r, 0);
+		r = null;
+		PortableUnicastRemoteObject.unexportObject(stub, true);
+		try {
+			stub.getString();
+			fail("object is no longer export, but i can used");
+		} catch (RemoteException e) {
+		}
+	}
+	
+	/**
+	 * The objects are exported in different hosts (one object per 
+	 * each host). In each exportation the destiny is verified.
+	 * 
+	 * @throws RemoteException if the exportation fails
+	 */
+	
+	public void testExportingAndComparing() throws RemoteException {
+				
+		for (final String host : hosts) {
+			ServerExecutor testObject = new ExecutorGetClientHost();
+			ServerExecutor stubTestObject = null;
+			try {
+				stubTestObject = (ServerExecutor) PortableUnicastRemoteObject.exportObject(host, (ITCRemote) testObject, 1123);
+				try {
+					assertEquals("The host must be " + host, host, stubTestObject.execute());
+					System.err.println(host + " OK" );
+				} catch (AssertionFailedError e) {
+					System.err.println(e);
+				}
+			} catch (NotBoundException e) {
+				log.warning("One host (" + host +") don't work anymore");
+			} finally {
+				if(stubTestObject != null && stubTestObject.clean(true)) {//PortableUnicastRemoteObject.unexportObject(stubTestObject, true)) {
+					log.warning("The ExecutorGetCliengHost can't be unexported");
+				}
+			}
+		}
+	}
+	
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/PortableTestCase.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/PropagableTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/PropagableTestCase.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/PropagableTestCase.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/PropagableTestCase.java Tue May 16 06:51:00 2006
@@ -0,0 +1,141 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the License);
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an AS IS BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package ar.org.fitc.test.rmi.integration.fase2.serverExecutor.test;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.rmi.RemoteException;
+import java.util.Arrays;
+
+import ar.org.fitc.test.rmi.integration.fase2.serverExecutor.PropagableTestRemote;
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.executor.ServerExecutor;
+
+
+/**
+ * Testing class for executing object on remote hosts. 
+ * 
+ * @author Jorge Rafael
+ * @author Marcelo Arcidiacono
+ *
+ * @version 1.0
+ */
+public class PropagableTestCase extends ExecutorTestCase {
+
+	/**
+	 * A <code>ServerExecutor</code>.
+	 */
+	public ServerExecutor serv;
+	
+	/**
+	 * Default constructor.
+	 *
+	 */
+	public PropagableTestCase() {
+		super();
+	}
+
+	/**
+	 * Constructs a <code>PropagableTestCase</code> with a name. 
+	 * 
+	 * @param arg0 a name.
+	 */
+	public PropagableTestCase(String arg0) {
+		super(arg0);
+	}
+	
+	/**
+	 * Creates a <code>PropagableTestRemote</code>.
+	 * 
+	 */
+	protected void setUp() throws Exception {
+		serv = (ServerExecutor) new PropagableTestRemote();
+		super.setUp();
+	}
+
+	/**
+	 * Forces the garbage collector.
+	 * 
+	 */
+	protected void tearDown() throws Exception {
+		super.tearDown();
+		forceGC();
+	}
+
+	/**
+	 * Simply executes an object on a host. This procedure is 
+	 * repeated on all hosts.
+	 * 
+	 */
+	public void testPropagableOneHost001() {
+		for (final String host : hosts) {
+			try {
+				assertTrue("The execute host must be " + host,
+						(Boolean) executor.execute(host, serv, 1,1, host));
+			} catch (RemoteException e) {
+				fail("Non work: " + e);
+			}
+		}
+	}
+
+	/**
+	 * Executes an object on a unitary list of remote hosts. 
+	 * This procedure is repeated on all reported hosts.
+	 * 
+	 */
+	public void testPropagableOneHost002() {
+		for (final String host : hosts) {
+			try {
+				assertTrue("The execute host must be " + host,
+						(Boolean) executor.execute(new String[] { host }, serv,
+								1,1, host));
+			} catch (RemoteException e) {
+				fail("Non work: " + e);
+				
+			}
+		}
+	}
+
+	/**
+	 * Simply executes an object on a list of remote hosts.
+	 * 
+	 * @throws SecurityException if occurs a security violation
+	 * @throws NoSuchMethodException if a particular method cannot 
+	 * be found
+	 * @throws IllegalArgumentException if a method has been passed 
+	 * an illegal or inappropriate argument
+	 * @throws IllegalAccessException if tries to reflectively create 
+	 * an instance 
+	 * @throws InvocationTargetException wraps an exception thrown 
+	 * by an invoked method or constructor
+	 */
+	public void testPropagableAtOnes001() throws SecurityException,
+			NoSuchMethodException, IllegalArgumentException,
+			IllegalAccessException, InvocationTargetException {
+
+		Method m = executor.getClass().getMethod("execute", String[].class,
+				ServerExecutor.class, int.class, Object[].class);
+		Object[] hostsP = new Object[hosts.length+1];
+		hostsP[0] = hosts.length;
+		System.arraycopy(hosts, 0, hostsP, 1, hosts.length);
+		Object[] param = new Object[4];
+		param[0] = hosts;
+		param[1] = serv;
+		param[2] = 1;
+		param[3] = hostsP;
+		assertTrue("The execute hosts must be " + Arrays.toString(hosts),
+				(Boolean) m.invoke(executor, param));
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/PropagableTestCase.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/RemoteRegistryTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/RemoteRegistryTestCase.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/RemoteRegistryTestCase.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/RemoteRegistryTestCase.java Tue May 16 06:51:00 2006
@@ -0,0 +1,224 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the License);
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an AS IS BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package ar.org.fitc.test.rmi.integration.fase2.serverExecutor.test;
+
+import java.net.MalformedURLException;
+import java.rmi.AccessException;
+import java.rmi.AlreadyBoundException;
+import java.rmi.NotBoundException;
+import java.rmi.RemoteException;
+import java.rmi.ServerException;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.ITCRemoteUnicast;
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.Net;
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.executor.ReportIPServer;
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.interfaces.ITCRemote;
+import ar.org.fitc.test.rmi.integration.fase2.serverExecutor.AutoBindITCRemoteUnicast;
+
+/**
+ * Testing class for a remote <code>Registry</code>.
+ * 
+ * @author Jorge Rafael
+ * @author Marcelo Arcidiacono
+ *
+ * @version 1.0
+ */
+public class RemoteRegistryTestCase extends ITCTestCase {
+
+	/**
+	 * A simple <code>Registry</code>. 
+	 */
+	public Registry reg;
+
+	/**
+	 * An <code>ITCRemote</code> for exporting.
+	 */
+	public ITCRemote exportObj;
+
+	/**
+	 * Default constructor.
+	 *
+	 */
+	public RemoteRegistryTestCase() {
+		super();
+	}
+
+	/**
+	 * Constructs a <code>RemoteRegistryTestCase</code> with a name. 
+	 * 
+	 * @param arg0 a name.
+	 */
+	public RemoteRegistryTestCase(String arg0) {
+		super(arg0);
+	}
+
+	/**
+	 * Assigns a <code>Registry</code> for each reported server and 
+	 * exports an object on them. 
+	 * 
+	 * @throws Exception if a failure occurs during exportation
+	 */
+	protected void setUp() throws Exception {
+		String[] hosts = ReportIPServer.getit();
+		reg = LocateRegistry.getRegistry(hosts[0], Net.getRegistryPort());
+		exportObj = new ITCRemoteUnicast();
+		super.setUp();
+	}
+
+	/**
+	 * Tries to bind a remote object in a <code>Registry</code> of a 
+	 * non-local host. 
+	 * 
+	 * @throws RemoteException if remote communication with the 
+	 * registry failed 
+	 * @throws AlreadyBoundException if the name is already bound 
+	 */
+	public void testBind001() throws RemoteException, AlreadyBoundException {
+
+		try {
+			reg.bind("echo", exportObj);
+			fail("Stub of registry can't chanch registry");
+		} catch (ServerException e) {
+		}
+	}
+
+	/**
+	 * This test verifies that all elements in a non-local <code>
+	 * Registry</code> are functional. 
+	 * 
+	 * @throws AccessException if this registry is local and it 
+	 * denies the caller access to perform this operation 
+	 * @throws RemoteException if remote communication with the 
+	 * registry failed 
+	 * @throws NotBoundException if the name is not currently bound 
+	 */
+	public void testLookup001() throws AccessException, RemoteException,
+			NotBoundException {
+		for (String bindName : reg.list() ) {
+			ITCRemote o =(ITCRemote) reg.lookup(bindName);
+			o.getString();
+		}
+	}
+
+	/**
+	 * This test tries lookup a non-bounded remote object. 
+	 * 
+	 * @throws RemoteException if remote communication with the 
+	 * registry failed 
+	 * @throws MalformedURLException if the name is not an 
+	 * appropriately formatted URL
+	 * @throws NotBoundException if the name is not currently bound
+	 */
+	public void testLookup002() throws RemoteException, MalformedURLException,
+			NotBoundException {
+		try {
+			reg.lookup("echo123413");
+			fail("Mal formed URL");
+		} catch (NotBoundException e) {
+		} catch (Throwable e) {
+			fail("Failed with:" + e);
+		}
+	}
+
+	/**
+	 * This test tries lookup a remote object with a non-existing name. 
+	 * 
+	 * @throws RemoteException if remote communication with the 
+	 * registry failed  
+	 * @throws MalformedURLException if the name is not an 
+	 * appropriately formatted URL
+	 * @throws NotBoundException if the name is not currently bound
+	 */
+	public void testLookup003() {
+		try {
+			reg.lookup("#$%$%echo");
+			fail("Mal formed URL");
+		} catch (NotBoundException e) {
+		} catch (Throwable e) {
+			fail("Failed with:" + e);
+		}
+	}
+
+	/**
+	 * This test tries to re-bind a remote object with a same name 
+	 * in a Registry. 
+	 * 
+	 * @throws RemoteException if remote communication with the 
+	 * registry failed  
+	 * @throws AlreadyBoundException if the name is already bound 
+	 */
+	public void testRebind001() throws RemoteException, MalformedURLException,
+			NotBoundException {
+		try {
+			reg.rebind("echo", exportObj);
+			fail("Stub of registry can't chanch registry");
+		} catch (ServerException e) {
+		}
+	}
+
+	/**
+	 * This test tries to un-bind remote objects from a non-local 
+	 * <code>Registry</code>. The object must to be registred.
+	 * 
+	 * @throws AccessException if this registry is local and it 
+	 * denies the caller access to perform this operation 
+	 * @throws RemoteException if remote communication with the 
+	 * registry failed  
+	 * @throws NotBoundException if the name is not currently bound
+	 */
+	@SuppressWarnings("unchecked")
+	public void testUnbind() throws AccessException, RemoteException,
+			NotBoundException {
+		for (String bindName : reg.list() ) {
+			try {
+				reg.unbind(bindName);
+				fail("Stub of registry can't chanch registry");
+			} catch (ServerException e) {
+				ITCRemote o =(ITCRemote) reg.lookup(bindName);
+				o.getString();
+			}
+		}
+	}
+
+	/**
+	 * This case makes a test on a non-exported object. If this 
+	 * object is deserialized, it is exported and bounded. This object 
+	 * is sent as parameter to a non-local <code>Registry</code>. The 
+	 * binding fails. However the object will be bounded because 
+	 * will be deserialized.
+	 * 
+	 * @throws RemoteException if remote communication with the 
+	 * registry failed  
+	 */
+	public void testAutoBindAndExportionUsingRemoteRegistry() throws RemoteException {
+		exportObj = new AutoBindITCRemoteUnicast();
+		exportObj.clean(true);
+		
+		try {
+			reg.rebind(AutoBindITCRemoteUnicast.BIND_NAME, exportObj);
+			fail("can't bind remotelly");
+		} catch (ServerException e) {
+		}
+		
+		try {
+			reg.lookup(AutoBindITCRemoteUnicast.BIND_NAME);
+			fail("Object binded");
+		} catch (NotBoundException e) {
+		}
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/RemoteRegistryTestCase.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/ReportIPTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/ReportIPTestCase.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/ReportIPTestCase.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/ReportIPTestCase.java Tue May 16 06:51:00 2006
@@ -0,0 +1,123 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the License);
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an AS IS BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package ar.org.fitc.test.rmi.integration.fase2.serverExecutor.test;
+
+import java.net.InetAddress;
+import java.net.MalformedURLException;
+import java.net.UnknownHostException;
+import java.rmi.RemoteException;
+
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.executor.ClientExecutor;
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.executor.ReportIP;
+
+/**
+ * Testing class for <code>ReportIP</code>.
+ * 
+ * @author Jorge Rafael
+ * @author Marcelo Arcidiacono
+ *
+ * @version 1.0
+ */
+public class ReportIPTestCase extends ITCTestCase {
+
+	/**
+	 * A <code>ReportIP</code>.
+	 */
+	public ReportIP reporter;
+
+	/**
+	 * Default constructor.
+	 *
+	 */
+	public ReportIPTestCase() {
+		super();
+	}
+
+	/**
+	 * Constructs a <code>ReportIPTestCase</code> with a name. 
+	 * 
+	 * @param arg0 a name.
+	 */
+	public ReportIPTestCase(String arg0) {
+		super(arg0);
+	}
+
+	/**
+	 * Creates a <code>ReportIP</code>
+	 * 
+	 */
+	protected void setUp() throws Exception {
+		reporter = (ReportIP) java.rmi.Naming.lookup(ReportIP.BIND_NAME);
+		super.setUp();
+	}
+
+	/**
+	 * Verifies the host name of the current <code>ReportIP</code>.
+	 * 
+	 * @throws RemoteException if the remote operation fails
+	 * @throws UnknownHostException if the IP address of a host could 
+	 * not be determined
+	 */
+	public void testMyHostName001() throws RemoteException,
+			UnknownHostException {
+		String hostName = reporter.myHostName();
+		for (InetAddress address : InetAddress.getAllByName(hostName)) {
+			if (address.isLoopbackAddress() || address.isSiteLocalAddress()) {
+				return;
+			}
+		}
+		fail("The reporter.myHostName is not my");
+	}
+
+	/**
+	 * Verifies that the <code>ReportIPServer</code> returns a string 
+	 * of valid IP addresses. 
+	 * 
+	 * @throws RemoteException if the remote operation fails
+	 * @throws UnknownHostException if the IP address of a host could 
+	 * not be determined
+	 */
+	public void testGetIt001() throws RemoteException, UnknownHostException {
+		String[] hosts = reporter.getIP();
+		for (String host : hosts) {
+			assertNotNull(InetAddress.getAllByName(host));
+		}
+	}
+	
+	/**
+	 * Reports a new host and wait that the <code>ReportIP</code> adds 
+	 * the host
+	 * 
+	 * @throws RemoteException if the remote operation fails
+	 * @throws MalformedURLException if the name is not an appropriately 
+	 * formatted URL 
+	 */
+	public void testReport001() throws RemoteException, MalformedURLException {
+		String hostName = reporter.myHostName();
+		ClientExecutor.exportExecutor();
+		String[] initialhosts = reporter.getIP();
+		reporter.report();
+		String[] hosts = reporter.getIP();
+		for (int i = 0, j = 0; i < hosts.length; i++, j++) {
+			if (hosts[i].equals(hostName)) {
+				j--;
+			} else if (hosts[i].equals(initialhosts[j])) {
+			} else {
+				fail("I report and i don't see me in the list");
+			}
+		}
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/ReportIPTestCase.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/TestITCRemote.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/TestITCRemote.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/TestITCRemote.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/TestITCRemote.java Tue May 16 06:51:00 2006
@@ -0,0 +1,174 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the License);
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an AS IS BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package ar.org.fitc.test.rmi.integration.fase2.serverExecutor.test;
+
+import java.lang.ref.WeakReference;
+import java.net.MalformedURLException;
+import java.rmi.Naming;
+import java.rmi.NoSuchObjectException;
+import java.rmi.NotBoundException;
+import java.rmi.RemoteException;
+import java.rmi.server.UnicastRemoteObject;
+
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.interfaces.ITCRemote;
+
+/**
+ * Testing class for <code>ITCRemote</code>.
+ * 
+ * @author Jorge Rafael
+ * @author Marcelo Arcidiacono
+ * 
+ * @version 1.0
+ */
+abstract public class TestITCRemote extends ITCTestCase {
+	
+	/**
+	 * A simple <code>ITCRemote</code> object.
+	 */
+	protected ITCRemote ret;
+	
+	/**
+	 * A simple <code>ITCRemote</code> object.
+	 */
+	private ITCRemote retBind;
+	
+	/**
+	 * Binds a copy of an <code>ITCRemote</code> object.
+	 * 
+	 * @throws Exception if the bind operation fails
+	 */
+	protected void setUp() throws Exception {
+		initRegistry();
+		retBind = ret;
+		ret = retBind.myClone();
+//		ret = null;
+		Naming.bind("ITCREMOTE", retBind);
+		super.setUp();
+	}
+	
+	/**
+	 * Unbinds an <code>ITCRemote<code> object.  
+	 * 
+	 * @throws Exception if the unbind operation fails
+	 */
+	protected void tearDown() throws Exception {
+		super.tearDown();
+		ret = null;
+		retBind = null;
+		Naming.unbind("ITCREMOTE");
+		forceGC();
+	}
+	
+	/**
+	 * Forces the unexport of an <code>ITCRemote</code> object. 
+	 * 
+	 * @throws RemoteException if the unexport operation fails
+	 */
+	@SuppressWarnings("unchecked")
+	public void testClean() throws RemoteException {
+		retBind.clean(true);
+		WeakReference weak = new WeakReference(retBind);
+		retBind = null;
+		assertNull(weak);
+	}
+	
+	@SuppressWarnings("unchecked")
+	public void testClean2() throws RemoteException {
+		ret.clean(true);
+		WeakReference weak = new WeakReference(ret);
+		ret = null;
+		assertNull(weak);
+	}
+
+	/**
+	 * Verifies the <code>WeakReference</code>.
+	 * 
+	 */
+	@SuppressWarnings("unchecked")
+	public void testGCBindObject() {
+		WeakReference weak = new WeakReference(retBind);
+		retBind = null;
+		assertNotNull(weak);
+	}
+	
+	/**
+	 * Verifies a <code>WeakReference</code> by forcing the 
+	 * unexport of an <code>ITCRemote</code> object. 
+	 * 
+	 * @throws RemoteException if the operation fail
+	 * @throws MalformedURLException if the name is not an appropriately 
+	 * formatted URL 
+	 * @throws NotBoundException if name is not currently bound  
+	 */
+	@SuppressWarnings("unchecked")
+	public void testGCCleanBind() throws RemoteException, MalformedURLException, NotBoundException {
+		retBind.clean(true);
+		WeakReference weak = new WeakReference(retBind);
+		retBind = null;
+		assertNull(weak);
+		try {
+			((ITCRemote)Naming.lookup("ITCREMOTE")).getString();
+		} catch (NoSuchObjectException e) {
+		}
+	}
+	
+	/**
+	 * Verifies a lookup of an <code>ITCRemote</code> object.
+	 *  
+	 * @throws RemoteException if the lookup operation fails
+	 * @throws MalformedURLException if the name is not an appropriately 
+	 * formatted URL 
+	 * @throws NotBoundException if name is not currently bound  
+	 */
+	public void test001() throws RemoteException, MalformedURLException, NotBoundException {
+		assertNotNull(Naming.lookup("ITCREMOTE"));		
+	}
+	
+	/**
+	 * Verifies the <code>WeakReference</code> of an export object.
+	 * 
+	 * @throws RemoteException if the exportation fails
+	 */
+	@SuppressWarnings("unchecked")
+	public void testDGCExport() throws RemoteException {
+		UnicastRemoteObject.exportObject(ret, 10000);
+		WeakReference weak = new WeakReference(ret);
+		ret = null;
+		assertNull(weak);
+	}
+	
+	/**
+	 * Verifies the <code>imInServer</code> method.
+	 * 
+	 * @throws RemoteException if the remote operation fails
+	 */
+	public void testImInServer() throws RemoteException {
+		assertTrue(ret.imInServer());
+	}
+	
+	/**
+	 * Verifies the <code>imInServer</code> method on a remote 
+	 * reference. 
+	 * 
+	 * @throws RemoteException if the remote operation fails
+	 * @throws MalformedURLException if the name is not an appropriately 
+	 * formatted URL 
+	 * @throws NotBoundException if name is not currently bound  
+	 */
+	public void testImInServerRef() throws RemoteException, MalformedURLException, NotBoundException {
+		assertTrue(((ITCRemote)Naming.lookup("ITCREMOTE")).imInServer());
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/TestITCRemote.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/TestITCRemoteUnicast.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/TestITCRemoteUnicast.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/TestITCRemoteUnicast.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/TestITCRemoteUnicast.java Tue May 16 06:51:00 2006
@@ -0,0 +1,41 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the License);
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an AS IS BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package ar.org.fitc.test.rmi.integration.fase2.serverExecutor.test;
+
+import java.rmi.RemoteException;
+
+import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.ITCRemoteUnicast;
+
+/**
+ * Testing class for <code>ITCRemoteUnicast</code>.
+ * 
+ * @author Jorge Rafael 
+ * @author Marcelo Arcidiacono
+ *
+ * @version 1.0
+ */
+public class TestITCRemoteUnicast extends TestITCRemote {
+	
+	/**
+	 * Creates a new <code>ITCRemoteUnicast</code>.
+	 * 
+	 * @throws RemoteException if failed to export object
+	 */
+	protected void setUp() throws Exception {
+		ret = new ITCRemoteUnicast();
+		super.setUp();
+	}
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/integration/fase2/serverExecutor/test/TestITCRemoteUnicast.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/BigEcho.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/BigEcho.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/BigEcho.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/BigEcho.java Tue May 16 06:51:00 2006
@@ -0,0 +1,35 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.object2test;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+public interface BigEcho extends Remote, Cloneable {
+    public void echo() throws RemoteException;
+
+    public void echo(Object... objs) throws RemoteException;
+
+    public Object echoAndReturn() throws RemoteException;
+
+    public Object echoAndReturn(Object... objs) throws RemoteException;
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/BigEcho.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/BigEcho_imp.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/BigEcho_imp.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/BigEcho_imp.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/BigEcho_imp.java Tue May 16 06:51:00 2006
@@ -0,0 +1,60 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.object2test;
+
+import java.rmi.RemoteException;
+import java.rmi.server.RMIClientSocketFactory;
+import java.rmi.server.RMIServerSocketFactory;
+import java.rmi.server.UnicastRemoteObject;
+
+public class BigEcho_imp extends UnicastRemoteObject implements BigEcho {
+
+    private static final long serialVersionUID = 1L;
+
+    public BigEcho_imp() throws RemoteException {
+        super();
+    }
+
+    public BigEcho_imp(int port) throws RemoteException {
+        super(port);
+    }
+
+    public BigEcho_imp(int port, RMIClientSocketFactory csf,
+            RMIServerSocketFactory ssf) throws RemoteException {
+        super(port, csf, ssf);
+    }
+
+    public void echo() throws RemoteException {
+    }
+
+    public void echo(Object... objs) throws RemoteException {
+    }
+
+    public Object echoAndReturn() throws RemoteException {
+        return null;
+    }
+
+    public Object echoAndReturn(Object... objs) throws RemoteException {
+        return null;
+    }
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/BigEcho_imp.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/Echo.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/Echo.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/Echo.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/Echo.java Tue May 16 06:51:00 2006
@@ -0,0 +1,31 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.object2test;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+public interface Echo extends Remote {
+
+    public String echo(String msg) throws RemoteException;
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/Echo.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoActivatable_Imp.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoActivatable_Imp.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoActivatable_Imp.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoActivatable_Imp.java Tue May 16 06:51:00 2006
@@ -0,0 +1,79 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.object2test;
+
+import java.io.IOException;
+import java.rmi.MarshalledObject;
+import java.rmi.RemoteException;
+import java.rmi.activation.Activatable;
+import java.rmi.activation.ActivationException;
+import java.rmi.activation.ActivationID;
+import java.rmi.server.RMIClientSocketFactory;
+import java.rmi.server.RMIServerSocketFactory;
+
+public class EchoActivatable_Imp extends Activatable implements Echo {
+
+    public EchoActivatable_Imp(String arg0, MarshalledObject arg1,
+            boolean arg2, int arg3) throws ActivationException, RemoteException {
+        super(arg0, arg1, arg2, arg3);
+
+    }
+
+    public EchoActivatable_Imp(String arg0, MarshalledObject arg1,
+            boolean arg2, int arg3, RMIClientSocketFactory arg4,
+            RMIServerSocketFactory arg5) throws ActivationException,
+            RemoteException {
+        super(arg0, arg1, arg2, arg3, arg4, arg5);
+
+    }
+
+    public EchoActivatable_Imp(ActivationID arg0, int arg1)
+            throws RemoteException {
+        super(arg0, arg1);
+
+    }
+
+    public EchoActivatable_Imp(ActivationID arg0, int arg1,
+            RMIClientSocketFactory arg2, RMIServerSocketFactory arg3)
+            throws RemoteException {
+        super(arg0, arg1, arg2, arg3);
+
+    }
+
+    public EchoActivatable_Imp() throws RemoteException, IOException {
+        super(new ActivationID(new MyActivator()), 0);
+
+    }
+
+    public EchoActivatable_Imp(MarshalledObject mo) throws RemoteException {
+        super(new ActivationID(new MyActivator(mo)), 0);
+
+    }
+
+    public int msgCount = 0;
+
+    public String echo(String msg) throws RemoteException {
+
+        msgCount += 1;
+        return EchoUnicast_Imp.class + " - Ha dicho: " + msg;
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoActivatable_Imp.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoUnicast_Imp.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoUnicast_Imp.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoUnicast_Imp.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoUnicast_Imp.java Tue May 16 06:51:00 2006
@@ -0,0 +1,55 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.object2test;
+
+import java.rmi.RemoteException;
+import java.rmi.server.RMIClientSocketFactory;
+import java.rmi.server.RMIServerSocketFactory;
+import java.rmi.server.UnicastRemoteObject;
+
+@SuppressWarnings("serial")
+public class EchoUnicast_Imp extends UnicastRemoteObject implements Echo {
+
+    public int msgCount = 0;
+
+    public EchoUnicast_Imp() throws RemoteException {
+        super();
+
+    }
+
+    public EchoUnicast_Imp(int arg0) throws RemoteException {
+        super(arg0);
+
+    }
+
+    public EchoUnicast_Imp(int arg0, RMIClientSocketFactory arg1,
+            RMIServerSocketFactory arg2) throws RemoteException {
+        super(arg0, arg1, arg2);
+
+    }
+
+    public String echo(String msg) throws RemoteException {
+
+        msgCount += 1;
+        return EchoUnicast_Imp.class + " - Have said: " + msg;
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoUnicast_Imp.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoWithStubActivatable_Imp.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoWithStubActivatable_Imp.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoWithStubActivatable_Imp.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoWithStubActivatable_Imp.java Tue May 16 06:51:00 2006
@@ -0,0 +1,74 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.object2test;
+
+import java.io.IOException;
+import java.rmi.MarshalledObject;
+import java.rmi.RemoteException;
+import java.rmi.activation.Activatable;
+import java.rmi.activation.ActivationException;
+import java.rmi.activation.ActivationID;
+import java.rmi.server.RMIClientSocketFactory;
+import java.rmi.server.RMIServerSocketFactory;
+
+public class EchoWithStubActivatable_Imp extends Activatable implements Echo {
+
+    public EchoWithStubActivatable_Imp(String arg0, MarshalledObject arg1,
+            boolean arg2, int arg3) throws ActivationException, RemoteException {
+        super(arg0, arg1, arg2, arg3);
+    }
+
+    public EchoWithStubActivatable_Imp(String arg0, MarshalledObject arg1,
+            boolean arg2, int arg3, RMIClientSocketFactory arg4,
+            RMIServerSocketFactory arg5) throws ActivationException,
+            RemoteException {
+        super(arg0, arg1, arg2, arg3, arg4, arg5);
+    }
+
+    public EchoWithStubActivatable_Imp(ActivationID arg0, int arg1)
+            throws RemoteException {
+        super(arg0, arg1);
+    }
+
+    public EchoWithStubActivatable_Imp(ActivationID arg0, int arg1,
+            RMIClientSocketFactory arg2, RMIServerSocketFactory arg3)
+            throws RemoteException {
+        super(arg0, arg1, arg2, arg3);
+    }
+
+    public EchoWithStubActivatable_Imp() throws RemoteException, IOException {
+        super(new ActivationID(new MyActivator()), 0);
+    }
+
+    public EchoWithStubActivatable_Imp(MarshalledObject mo)
+            throws RemoteException {
+        super(new ActivationID(new MyActivator(mo)), 0);
+    }
+
+    public int msgCount = 0;
+
+    public String echo(String msg) throws RemoteException {
+        msgCount += 1;
+        return EchoUnicast_Imp.class + " - Have said: " + msg;
+    }
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoWithStubActivatable_Imp.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoWithStubUnicast_Imp.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoWithStubUnicast_Imp.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoWithStubUnicast_Imp.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoWithStubUnicast_Imp.java Tue May 16 06:51:00 2006
@@ -0,0 +1,53 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.object2test;
+
+import java.rmi.RemoteException;
+import java.rmi.server.RMIClientSocketFactory;
+import java.rmi.server.RMIServerSocketFactory;
+import java.rmi.server.UnicastRemoteObject;
+
+@SuppressWarnings("serial")
+public class EchoWithStubUnicast_Imp extends UnicastRemoteObject implements
+        Echo {
+
+    public EchoWithStubUnicast_Imp() throws RemoteException {
+        super();
+    }
+
+    public EchoWithStubUnicast_Imp(int arg0) throws RemoteException {
+        super(arg0);
+    }
+
+    public EchoWithStubUnicast_Imp(int arg0, RMIClientSocketFactory arg1,
+            RMIServerSocketFactory arg2) throws RemoteException {
+        super(arg0, arg1, arg2);
+    }
+
+    public int msgCount = 0;
+
+    public String echo(String msg) throws RemoteException {
+        msgCount += 1;
+        return EchoUnicast_Imp.class + " - Have said: " + msg;
+    }
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoWithStubUnicast_Imp.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoWithStub_Imp.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoWithStub_Imp.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoWithStub_Imp.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoWithStub_Imp.java Tue May 16 06:51:00 2006
@@ -0,0 +1,41 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.object2test;
+
+import java.rmi.RemoteException;
+
+@SuppressWarnings("serial")
+public class EchoWithStub_Imp extends Object implements Echo {
+
+    public EchoWithStub_Imp() throws RemoteException {
+        super();
+
+    }
+
+    public int msgCount = 0;
+
+    public String echo(String msg) throws RemoteException {
+        msgCount += 1;
+        return EchoUnicast_Imp.class + " - Ha dicho: " + msg;
+    }
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/EchoWithStub_Imp.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/Echo_Imp.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/Echo_Imp.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/Echo_Imp.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/Echo_Imp.java Tue May 16 06:51:00 2006
@@ -0,0 +1,37 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.object2test;
+
+import java.rmi.RemoteException;
+
+public class Echo_Imp implements Echo {
+
+    public Echo_Imp() {
+        super();
+    }
+
+    public String echo(String msg) throws RemoteException {
+
+        return Echo_Imp.class + " - Ha dicho: " + msg;
+    }
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/Echo_Imp.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/MyActivator.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/MyActivator.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/MyActivator.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/MyActivator.java Tue May 16 06:51:00 2006
@@ -0,0 +1,93 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.object2test;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.rmi.MarshalledObject;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.rmi.activation.ActivationException;
+import java.rmi.activation.ActivationID;
+import java.rmi.activation.Activator;
+import java.rmi.activation.UnknownObjectException;
+
+public class MyActivator implements Activator, Remote, Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    public MyActivator(MarshalledObject mo) {
+        super();
+        this.mo = mo;
+    }
+
+    public MyActivator() throws IOException {
+        super();
+        mo = new MarshalledObject(this);
+    }
+
+    final static public int NullR = 0;
+
+    final static public int ActivationE = 1;
+
+    final static public int UnknownObjectE = 2;
+
+    final static public int RemoteE = 3;
+
+    final static public int MySelfInMarshalledObjectR = 4;
+
+    public int i = 0;
+
+    public Boolean b = null;
+
+    public MarshalledObject mo;
+
+    public MarshalledObject activate(ActivationID arg0, boolean arg1)
+            throws ActivationException, UnknownObjectException, RemoteException {
+        b = new Boolean(arg1);
+        switch (i) {
+        case (NullR):
+            return null;
+        case (ActivationE):
+            throw new ActivationException();
+        case (UnknownObjectE):
+            throw new UnknownObjectException(null);
+        case (RemoteE):
+            throw new RemoteException();
+        default:
+            return mo;
+        }
+    }
+
+    public boolean equals(Object o) {
+        if (o instanceof MyActivator) {
+            MyActivator oac = (MyActivator) o;
+            if (oac.b == null && b == null) {
+                return oac.i == i;
+            }
+            if (oac.b.equals(b)) {
+                return oac.i == i;
+            }
+        }
+        return false;
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/MyActivator.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/MyRemoteRef.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/MyRemoteRef.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/MyRemoteRef.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/MyRemoteRef.java Tue May 16 06:51:00 2006
@@ -0,0 +1,87 @@
+/*
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.object2test;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.lang.reflect.Method;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.rmi.server.Operation;
+import java.rmi.server.RemoteCall;
+import java.rmi.server.RemoteObject;
+import java.rmi.server.RemoteRef;
+
+@SuppressWarnings("serial")
+public class MyRemoteRef implements RemoteRef {
+
+    public boolean bRemoteEquals = false;
+
+    public int iHashCode = 0;
+
+    public String sToString = null;
+
+    public Object invoke(Remote arg0, Method arg1, Object[] arg2, long arg3)
+            throws Exception {
+        return null;
+    }
+
+    @SuppressWarnings("deprecation")
+    public RemoteCall newCall(RemoteObject arg0, Operation[] arg1, int arg2,
+            long arg3) throws RemoteException {
+        return null;
+    }
+
+    @SuppressWarnings("deprecation")
+    public void invoke(RemoteCall arg0) throws Exception {
+    }
+
+    @SuppressWarnings("deprecation")
+    public void done(RemoteCall arg0) throws RemoteException {
+    }
+
+    public String getRefClass(ObjectOutput arg0) {
+        return null;
+    }
+
+    public int remoteHashCode() {
+        return iHashCode;
+    }
+
+    public boolean remoteEquals(RemoteRef arg0) {
+        bRemoteEquals = !bRemoteEquals;
+        return bRemoteEquals;
+    }
+
+    public String remoteToString() {
+        return sToString;
+    }
+
+    public void writeExternal(ObjectOutput arg0) throws IOException {
+    }
+
+    public void readExternal(ObjectInput arg0) throws IOException,
+            ClassNotFoundException {
+    }
+
+}
\ No newline at end of file

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/object2test/MyRemoteRef.java
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message