FileDocCategorySizeDatePackage
AsyncHandlerFactory.javaAPI DocGlassfish v2 API3782Fri May 04 22:24:18 BST 2007com.sun.enterprise.admin.monitor.callflow

AsyncHandlerFactory

public class AsyncHandlerFactory extends Object
todo
Add logging code
author
hsingh

Fields Summary
private static AsyncHandlerIntf
singletonAsyncHandler
private static final Logger
logger
private static boolean
traceOn
Constructors Summary
private AsyncHandlerFactory()
Creates a new instance of AsyncHandlerFactory

           
      
        traceOn = TraceOnHelper.isTraceOn();
    
Methods Summary
public static synchronized AsyncHandlerIntfgetInstance()

        if (singletonAsyncHandler == null){
            boolean perfImpl =
                    System.getProperty("com.sun.enterprise.callflow.perf", "true").equals("true");
            if (perfImpl){
                if (traceOn){
                    logger.log (Level.INFO, "Callflow: Starting Performant " +
                            "Implementation!. To switch to old implementation" +
                            " Add system property com.sun.enterprise.admin." +
                            "callflow.perf=false");
                }
                singletonAsyncHandler = AsyncHandlerProducer.getInstance();
            } else{
                if (traceOn){
                    logger.log (Level.INFO, "Callflow: Starting Old - Non " +
                            "Performant Implementation!");
                }
                singletonAsyncHandler = new AsyncHandler ();
            }
        }
        return singletonAsyncHandler;