9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 5021246
27 * @summary Check that class downloading is supported by RMI connector
28 * @author Eamonn McManus
29 * @modules java.management.rmi
30 * @run main RMIDownloadTest receive without
31 * @run main RMIDownloadTest send without
32 * @run main RMIDownloadTest receive with
33 * @run main RMIDownloadTest send with
34 */
35
36 /*
37 * This test checks that class downloading is supported by the RMI connector.
38 * We copy a precompiled class file into the temporary directory (which we
39 * assume is not in the classpath). We also create an instance of that
40 * class using a hardcoded ClassLoader. Then we try to get a remote attribute
41 * that returns that instance, and we try to set the remote attribute to the
42 * instance. In both cases, this will only work if the class can be downloaded
43 * based on the codebase that we have set to the temporary directory. We also
44 * test that it does *not* work when the codebase is not set, in case the test
45 * is succeeding for some other reason.
46 *
47 * We run the test four times, for each combination of (send, receive) x
48 * (with-codebase, without-codebase). Doing all four tests within the same
49 * run doesn't work, probably because RMI remembers the codebase property
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 5021246
27 * @summary Check that class downloading is supported by RMI connector
28 * @author Eamonn McManus
29 *
30 * @run main RMIDownloadTest receive without
31 * @run main RMIDownloadTest send without
32 * @run main RMIDownloadTest receive with
33 * @run main RMIDownloadTest send with
34 */
35
36 /*
37 * This test checks that class downloading is supported by the RMI connector.
38 * We copy a precompiled class file into the temporary directory (which we
39 * assume is not in the classpath). We also create an instance of that
40 * class using a hardcoded ClassLoader. Then we try to get a remote attribute
41 * that returns that instance, and we try to set the remote attribute to the
42 * instance. In both cases, this will only work if the class can be downloaded
43 * based on the codebase that we have set to the temporary directory. We also
44 * test that it does *not* work when the codebase is not set, in case the test
45 * is succeeding for some other reason.
46 *
47 * We run the test four times, for each combination of (send, receive) x
48 * (with-codebase, without-codebase). Doing all four tests within the same
49 * run doesn't work, probably because RMI remembers the codebase property
|