ActivationLibrary.java revision 2362
2362N/A * Copyright (c) 1998, 2006, 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 /** time safeDestroy should wait before failing on shutdown rmid */ 0N/A * Deactivate an activated Activatable 0N/A for (
int i =
0; i <
5; i ++) {
0N/A // forcibly unexport the object 0N/A mesg(
"unable to inactivate after several attempts");
0N/A mesg(
"unexporting object forcibly instead");
0N/A * Simple method call to see if rmid is running. 0N/A * This method intentionally avoids performing a lookup on the 0N/A * activation system. 0N/A for (
int i =
0; i <
15 ; i++) {
0N/A // ignore connect exceptions until we decide rmid is not up 0N/A // print out other types of exceptions as an FYI. 0N/A // test should not fail as rmid is likely to be in an 0N/A // undetermined state at this point. 0N/A mesg(
"caught an exception trying to" +
0N/A " start rmid, last exception was: " +
0N/A * Check to see if an arry of Strings contains a given string. 0N/A private static boolean 0N/A /** cleanup after rmid */ 0N/A * Invoke shutdown on rmid in a way that will not cause a test 0N/A * @return whether or not shutdown completed succesfully in the 0N/A * Thread class to handle the destruction of rmid 0N/A synchronized (
this) {
0N/A // flag that the test was able to shutdown rmid 0N/A mesg(
"tried to shutdown when rmid was not running");