< prev index next >

test/java/rmi/activation/Activatable/downloadParameterClass/DownloadParameterClass.java

Print this page




  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 /* @test
  25  * @bug 4149366
  26  * @summary The class loader used to load classes for parameter types sent in
  27  * an RMI call to an activatable object should delegate to the class loader
  28  * that loaded the class of the activatable object itself, to maximize the
  29  * likelihood of type compatibility between downloaded parameter types and
  30  * supertypes shared with the activatable object.
  31  * @author Peter Jones (much code taken from Ann Wollrath's activation tests)
  32  *
  33  * @library ../../../testlibrary




  34  * @build TestLibrary RMID ActivationLibrary
  35  *     Foo FooReceiverImpl FooReceiverImpl_Stub Bar
  36  * @run main/othervm/policy=security.policy/timeout=240 DownloadParameterClass
  37  */
  38 
  39 import java.io.*;
  40 import java.net.*;
  41 import java.util.*;
  42 import java.rmi.*;
  43 import java.rmi.activation.*;
  44 import java.rmi.server.*;
  45 import java.rmi.registry.*;
  46 
  47 public class DownloadParameterClass {
  48 
  49     public interface FooReceiver extends Remote {
  50 
  51         /*
  52          * The interface can't actually declare that the method takes a
  53          * Foo, because then Foo would have to be in the test's CLASSPATH,




  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 /* @test
  25  * @bug 4149366
  26  * @summary The class loader used to load classes for parameter types sent in
  27  * an RMI call to an activatable object should delegate to the class loader
  28  * that loaded the class of the activatable object itself, to maximize the
  29  * likelihood of type compatibility between downloaded parameter types and
  30  * supertypes shared with the activatable object.
  31  * @author Peter Jones (much code taken from Ann Wollrath's activation tests)
  32  *
  33  * @library ../../../testlibrary
  34  * @modules java.rmi/sun.rmi.registry
  35  *          java.rmi/sun.rmi.server
  36  *          java.rmi/sun.rmi.transport
  37  *          java.rmi/sun.rmi.transport.tcp
  38  * @build TestLibrary RMID ActivationLibrary
  39  *     Foo FooReceiverImpl FooReceiverImpl_Stub Bar
  40  * @run main/othervm/policy=security.policy/timeout=240 DownloadParameterClass
  41  */
  42 
  43 import java.io.*;
  44 import java.net.*;
  45 import java.util.*;
  46 import java.rmi.*;
  47 import java.rmi.activation.*;
  48 import java.rmi.server.*;
  49 import java.rmi.registry.*;
  50 
  51 public class DownloadParameterClass {
  52 
  53     public interface FooReceiver extends Remote {
  54 
  55         /*
  56          * The interface can't actually declare that the method takes a
  57          * Foo, because then Foo would have to be in the test's CLASSPATH,


< prev index next >