1 23 package com.sun.enterprise.diagnostics; 24 25 import com.sun.logging.LogDomains; 26 import java.util.logging.Logger ; 27 28 32 public class ExecutionContext { 33 protected static Logger ADMIN_LOGGER = 34 LogDomains.getLogger(LogDomains.ADMIN_LOGGER);; 35 public static final ExecutionContext LOCAL_EC = 36 new ExecutionContext(true, ADMIN_LOGGER); 37 public static final ExecutionContext REMOTE_EC = 38 new ExecutionContext(false, ADMIN_LOGGER); 39 protected boolean local = false; 40 private Logger logger; 41 42 43 public ExecutionContext(boolean local, Logger logger) { 44 this.local = local; 45 this.logger = logger; 46 } 47 48 public boolean isLocal() { 49 return local; 50 } 51 52 public Logger getLogger() { 53 if (logger == null) 54 return ADMIN_LOGGER; 55 return logger; 56 } 57 public String toString() { 58 return "" + isLocal(); 59 } 60 61 } 62 | Popular Tags |