/*
* 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 4510355
* @summary ActivationGroup implementations cannot be downloaded by default;
* Creates a custom activation group without setting a security manager
* in activation group's descriptor. The custom activation group
* implementation should be downloaded when first object within that group
* is activated.
* @author Ann Wollrath
*
* @library ../../../testlibrary
* @build TestLibrary RMID ActivationLibrary
* DownloadActivationGroup MyActivationGroupImpl DownloadActivationGroup_Stub
* @run main/othervm/policy=security.policy/timeout=240 DownloadActivationGroup
*/
public class DownloadActivationGroup
{
throws ActivationException, RemoteException
{
}
}
/**
* Used to activate object.
*/
public void ping() {
}
/**
* Spawns a thread to deactivate the object (and thus, shuts down the
* activation group).
*/
{
}
/**
* Thread to deactivate object.
*/
public void run() {
}
return id;
}
try {
/*
* Install group class file in codebase.
*/
"MyActivationGroupImpl", "group");
/*
* Start rmid.
*/
/*
* Create and register descriptors for custom group and an
* activatable object in that group.
*/
Properties p = new Properties();
new ActivationGroupDesc("MyActivationGroupImpl",
/*
* Start group (by calling ping).
*/
"ping object (forces download of group's class)");
"TEST PASSED: group's class downloaded successfully");
} catch (Exception e) {
TestLibrary.bomb(e);
} finally {
}
}
}
}