FileDocCategorySizeDatePackage
WebServiceEngineFactory.javaAPI DocGlassfish v2 API3369Fri May 04 22:32:42 BST 2007com.sun.enterprise.webservice.monitoring

WebServiceEngineFactory

public class WebServiceEngineFactory extends Object
Factory for the WebServiceEngine
author
Jerome Dochez

Fields Summary
private static WebServiceEngineFactory
_factory
private final WebServiceEngine
engine
Constructors Summary
protected WebServiceEngineFactory()
Creates a new instance of WebServiceEngineFactory

    
           
      
        // build-order problem--have to use reflection
        try {
            final ClassLoader classLoader   = Thread.currentThread().getContextClassLoader();
            final Class engineClass =
                classLoader.loadClass( "com.sun.enterprise.webservice.monitoring.WebServiceEngineImpl" );
            final java.lang.reflect.Method m  = engineClass.getDeclaredMethod( "getInstance", (Class[])null);
            engine  = (WebServiceEngine)m.invoke( null, (Object[])null );
        }
        catch( final Exception e ) {
            throw new Error( e );
        }
    
Methods Summary
public WebServiceEnginegetEngine()

return
this appserver WebServiceEngine instance

        return engine;
    
public static synchronized com.sun.enterprise.webservice.monitoring.WebServiceEngineFactorygetInstance()

return
the singleton Factory implementation

        if (_factory==null) {
            _factory = new WebServiceEngineFactory();
        }
        return _factory;