/*
* 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 4134233
* @bug 4213186
* @summary synopsis: ActivationSystem.unregisterGroup should unregister objects in group
* @author Ann Wollrath
*
* @library ../../../testlibrary
* @build TestLibrary RMID ActivationLibrary ActivateMe
*/
{
private static volatile boolean done = false;
throws Exception
{
super(id, 0);
}
/**
* Does nothing, but serves to activate this object.
*/
public void ping() { }
/**
* Deactivates the object. We need to unexport forcibly because
* this call is in-progress on this object, which is the same object
* that we are trying to deactivate.
*/
Activatable.unexportObject(this, true);
}
try {
/* Cause activation groups to have a security policy that will
* allow security managers to be downloaded and installed
*/
final Properties p = new Properties();
// activation groups
public void run () {
try {
new ActivationGroupDesc(p, null);
for (int i = 0; i < NUM_OBJECTS; i++) {
}
try {
error = "test failed: group still registered";
} catch (UnknownGroupException e) {
"group unregistered");
}
/*
* Deactivate objects so group VM will exit.
*/
for (int i = 0; i < NUM_OBJECTS; i++) {
}
} catch (Exception e) {
exception = e;
}
done = true;
}
};
t.start();
// Default jtreg timeout is two minutes.
// Timeout ourselves after one minute so that
// we can clean up.
t.join(60000);
} else if (!done) {
} else {
}
} catch (Exception e) {
} finally {
}
}
}