FileDocCategorySizeDatePackage
SaxParserHandlerFactory.javaAPI DocGlassfish v2 API3130Fri May 04 22:31:38 BST 2007com.sun.enterprise.deployment.node

SaxParserHandlerFactory

public class SaxParserHandlerFactory extends Object
Provides the appropriate implementation depending on the current runtime environment.
author
tjquinn

Fields Summary
Constructors Summary
public SaxParserHandlerFactory()
Creates a new instance of SaxParserHandlerFactory

    
Methods Summary
public static SaxParserHandlernewInstance()

        SaxParserHandler result = null;
        
        /*
         *If the property com.sun.aas.installRoot is defined, use the 
         *original implementation (SaxParserHandler) which fetches DTDs and
         *schemas from the installation directory tree.  Otherwise, assume that 
         *the app client container is running under Java Web Start. In that
         *case, there is no product installation directory (at least none can
         *be assumed).  The DTDs and schemas will be retrieved from the
         *JWS-specific jar file instead (SaxParserHandlerBundled).
         */
        if (System.getProperty("com.sun.aas.installRoot") == null) {
            result = new SaxParserHandlerBundled();
        } else {
            result = new SaxParserHandler();
        }
        return result;