5266N/A * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * @summary RMI should use new logging APIs. Unit test to exercise 0N/A * RMI's use of the java.util.logging API. 0N/A * @author Laird Dornin 0N/A * @build TestLibrary 0N/A * Perform following checks: 0N/A * 1. If using java.util.logging, turn on client call logger using 0N/A * system property, "sun.rmi.client.logCalls". Collect client call 0N/A * output using a custom stream handler. Verify client call output is 0N/A * generated and contains the string "outbound call". 0N/A * 2. Turn on server call using 0N/A * RemoteServer.setLog(ByteArrayOutputStream). Invoke some remote 0N/A * method calls verify logger output is non-null. 0N/A * Turn off server call log by doing setLog(null), verify output is 0N/A * zero length. Verify that RemoteServer.getLog == null 0N/A * Use setLog to turn call log back on. Invoke remote method that 0N/A * throws an exception and contains the string "exception". 0N/A * 3. Print directly to return value of RemoteServer.getLog(), verify 0N/A * logger output is non-null. 0N/A /* use registry to generate client & server call log info */ 0N/A * Used to collect output from specific loggers 0N/A * Ensure that a log has some output and that it contains a 0N/A * Check serverCallLog output 0N/A // generates a notbound exception 0N/A // should fail for lack of LoggingPermission "control"