< prev index next >

test/java/rmi/activation/ActivateFailedException/activateFails/ActivateFails.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 4097135
  26  * @summary Need a specific subtype of RemoteException for activation failure.
  27  *          If activation fails to happen during a call to a remote object,
  28  *          then the call should end in an ActivateFailedException. In this
  29  *          test, the actual "activatable" remote object fails to activate
  30  *          since its * "activation" constructor throws an exception.
  31  * @author Ann Wollrath
  32  *
  33  * @library ../../../testlibrary




  34  * @build TestLibrary RMID ActivationLibrary
  35  *     ActivateMe ActivateFails_Stub ShutdownThread
  36  * @run main/othervm/java.security.policy=security.policy/timeout=240 ActivateFails
  37  */
  38 
  39 import java.rmi.*;
  40 import java.rmi.server.*;
  41 import java.rmi.activation.*;
  42 import java.io.*;
  43 import java.util.Properties;
  44 
  45 public class ActivateFails
  46         extends Activatable
  47         implements ActivateMe
  48 {
  49 
  50     public ActivateFails(ActivationID id, MarshalledObject obj)
  51         throws ActivationException, RemoteException
  52     {
  53         super(id, 0);




  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 4097135
  26  * @summary Need a specific subtype of RemoteException for activation failure.
  27  *          If activation fails to happen during a call to a remote object,
  28  *          then the call should end in an ActivateFailedException. In this
  29  *          test, the actual "activatable" remote object fails to activate
  30  *          since its * "activation" constructor throws an exception.
  31  * @author Ann Wollrath
  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  *     ActivateMe ActivateFails_Stub ShutdownThread
  40  * @run main/othervm/java.security.policy=security.policy/timeout=240 ActivateFails
  41  */
  42 
  43 import java.rmi.*;
  44 import java.rmi.server.*;
  45 import java.rmi.activation.*;
  46 import java.io.*;
  47 import java.util.Properties;
  48 
  49 public class ActivateFails
  50         extends Activatable
  51         implements ActivateMe
  52 {
  53 
  54     public ActivateFails(ActivationID id, MarshalledObject obj)
  55         throws ActivationException, RemoteException
  56     {
  57         super(id, 0);


< prev index next >