corba/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java
changeset 2664 a0a22a8f16bd
parent 4 02bb8761fcce
child 3291 805a72a26925
equal deleted inserted replaced
2553:a8134c4ee2cf 2664:a0a22a8f16bd
     1 /*
     1 /*
     2  * Copyright 2000-2004 Sun Microsystems, Inc.  All Rights Reserved.
     2  * Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Sun designates this
     7  * published by the Free Software Foundation.  Sun designates this
   804         }
   804         }
   805 
   805 
   806         return result ;
   806         return result ;
   807     }
   807     }
   808 
   808 
   809     public static void setDaemon(Thread thread)
       
   810     {
       
   811         // Catch exceptions since setDaemon can cause a
       
   812         // security exception to be thrown under netscape
       
   813         // in the Applet mode
       
   814         final Thread finalThread = thread;
       
   815         try {
       
   816             AccessController.doPrivileged(new PrivilegedAction() {
       
   817                     public java.lang.Object run() {
       
   818                         finalThread.setDaemon(true);
       
   819                         return null;
       
   820                     }
       
   821                 });
       
   822         } catch (Exception e) {
       
   823             // REVISIT: Object to get static method. Ignore it.
       
   824             dprint(new Object(), "setDaemon: Exception: " + e);
       
   825         }
       
   826     }
       
   827 
       
   828     public static String operationNameAndRequestId(CorbaMessageMediator m)
   809     public static String operationNameAndRequestId(CorbaMessageMediator m)
   829     {
   810     {
   830         return "op/" + m.getOperationName() + " id/" + m.getRequestId();
   811         return "op/" + m.getOperationName() + " id/" + m.getRequestId();
   831     }
   812     }
   832 
   813