1 23 package com.sun.enterprise.util; 24 25 import java.util.logging.*; 26 import com.sun.logging.*; 27 28 29 33 public class Environment { 34 public static final int OPEN = 1; 35 public static final int CLOSED = 0; 36 37 private static String ENV_CLASS_NAME 38 = "com.sun.enterprise.ee.util.OpenEnvironment"; 39 40 protected Environment() { 41 } 42 43 public int getEnvironmentStatus() { 44 return Environment.CLOSED; 45 } 46 47 public static Environment obtain() { 48 Environment e = new Environment(); 49 try { 50 Object obj = java.security.AccessController.doPrivileged 51 (new java.security.PrivilegedExceptionAction () { 52 public java.lang.Object run() throws Exception { 53 return Class.forName(ENV_CLASS_NAME).newInstance(); 54 } 55 }); 56 if (obj != null) { 57 e = (Environment) obj; 58 } 59 } catch (Exception ex) { 60 } 61 return e; 62 } 63 64 public void unlock() { 65 return; 66 } 67 } 68 | Popular Tags |