/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code 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 General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* @test
* @bug 4486732
* @summary When a remote stub contains a client socket factory and a
* remote invocation is made using that stub, the factory should not
* be held strongly reachable by the RMI implementation forever; in
* particular, after the stub has become unreachable and all
* connections to its endpoint have been closed, then the factory
* should become unreachable too (through the RMI implementation).
* @author Peter Jones
*
* @library ../../testlibrary
* @build TestLibrary
* PinClientSocketFactory
*/
public class PinClientSocketFactory {
}
}
FactoryImpl() { }
// return impl instead of stub to work around 4114579
return impl;
}
}
SessionImpl() { }
public void ping() { }
}
for (int i = 0; i < SESSIONS; i++) {
}
registryStub.list();
registryStub = null;
// allow connections to time out
15000));
throw new Error("unexpected number of deserialized instances: " +
}
int nonNullCount = 0;
nonNullCount++;
}
}
if (nonNullCount > 0) {
throw new Error("TEST FAILED: " +
nonNullCount + " non-null deserialized instances");
}
throw new Error("TEST FAILED: non-null registry instance");
}
}
CSF() { }
}
public int hashCode() {
return num;
}
}
throws IOException, ClassNotFoundException
{
}
}
SSF() { }
return new ServerSocket(port);
}
}
}