1 23 24 package com.sun.enterprise.server.ss.spi; 25 26 import com.sun.enterprise.server.PELaunch; 27 32 public class ASSocketFacadeUtils { 33 private static ASSocketServiceFacade _instance = null; 34 35 public static ASSocketServiceFacade getASSocketService() { 36 try { 37 if(_instance == null) { 38 String proxyClassName = "com.sun.enterprise.server.ss.ASSocketServiceProxy"; 39 Class socketServiceProxy = null; 40 42 if(Boolean.getBoolean(PELaunch.USE_NEW_CLASSLOADER_PROPERTY)) { 43 socketServiceProxy = PELaunch.getAppServerChain().loadClass(proxyClassName); 44 } else { 45 socketServiceProxy = ASSocketFacadeUtils.class.getClassLoader().loadClass(proxyClassName); 46 } 47 _instance = (ASSocketServiceFacade)socketServiceProxy.newInstance(); 48 } 49 return _instance; 50 } catch (Exception e) { 51 RuntimeException rte = new RuntimeException (e.getMessage()); 52 rte.initCause(e); 53 throw rte; 54 } 55 } 56 } 57 | Popular Tags |