test/java/rmi/activation/Activatable/nestedActivate/NestedActivate.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 4138056
  26  * @summary synopsis: Activating objects from an Activatable constructor causes deadlock
  27  * @author Ann Wollrath
  28  *
  29  * @library ../../../testlibrary
  30  * @modules java.rmi/sun.rmi.registry
  31  *          java.rmi/sun.rmi.server
  32  *          java.rmi/sun.rmi.transport
  33  *          java.rmi/sun.rmi.transport.tcp

  34  * @build TestLibrary RMID ActivationLibrary ActivateMe NestedActivate_Stub
  35  * @run main/othervm/policy=security.policy/timeout=240 NestedActivate
  36  */
  37 
  38 import java.io.*;
  39 import java.rmi.*;
  40 import java.rmi.activation.*;
  41 import java.rmi.server.*;
  42 import java.rmi.registry.*;
  43 import java.util.Properties;
  44 
  45 public class NestedActivate
  46         extends Activatable
  47         implements ActivateMe, Runnable
  48 {
  49 
  50     private static Exception exception = null;
  51     private static boolean done = false;
  52     private ActivateMe obj = null;
  53 




  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 4138056
  26  * @summary synopsis: Activating objects from an Activatable constructor causes deadlock
  27  * @author Ann Wollrath
  28  *
  29  * @library ../../../testlibrary
  30  * @modules java.rmi/sun.rmi.registry
  31  *          java.rmi/sun.rmi.server
  32  *          java.rmi/sun.rmi.transport
  33  *          java.rmi/sun.rmi.transport.tcp
  34  *          java.base/sun.nio.ch
  35  * @build TestLibrary RMID ActivationLibrary ActivateMe NestedActivate_Stub
  36  * @run main/othervm/policy=security.policy/timeout=240 NestedActivate
  37  */
  38 
  39 import java.io.*;
  40 import java.rmi.*;
  41 import java.rmi.activation.*;
  42 import java.rmi.server.*;
  43 import java.rmi.registry.*;
  44 import java.util.Properties;
  45 
  46 public class NestedActivate
  47         extends Activatable
  48         implements ActivateMe, Runnable
  49 {
  50 
  51     private static Exception exception = null;
  52     private static boolean done = false;
  53     private ActivateMe obj = null;
  54