FileDocCategorySizeDatePackage
ASSocketFacadeUtils.javaAPI DocGlassfish v2 API3283Fri May 04 22:35:54 BST 2007com.sun.enterprise.server.ss.spi

ASSocketFacadeUtils

public class ASSocketFacadeUtils extends Object
This utility class houses methods to get ASSocketServiceFacade
author
Sivakumar Thyagarajan, Binod PG
since
SJSAS 9.0

Fields Summary
private static ASSocketServiceFacade
_instance
Constructors Summary
Methods Summary
public static ASSocketServiceFacadegetASSocketService()

    
        
        try {
            if(_instance == null) {
                String proxyClassName = "com.sun.enterprise.server.ss.ASSocketServiceProxy";
                Class socketServiceProxy = null;
                /* If the new classloader hierachy is switched on, use appserver-chain to load
                   the class */
                if(Boolean.getBoolean(PELaunch.USE_NEW_CLASSLOADER_PROPERTY)) {
                    socketServiceProxy = PELaunch.getAppServerChain().loadClass(proxyClassName);
                } else {
                    socketServiceProxy = ASSocketFacadeUtils.class.getClassLoader().loadClass(proxyClassName);
                }
                _instance = (ASSocketServiceFacade)socketServiceProxy.newInstance();
            }
            return _instance;
        } catch (Exception e) {
            RuntimeException rte = new RuntimeException(e.getMessage());
            rte.initCause(e);
            throw rte;
        }