Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.apache.xerces.parsers
Class CachingParserPool

    java.lang.Object
      weblogic.apache.xerces.parsers.CachingParserPool

Deprecated. please use JDK supplied XML parsers and transformers

    public class CachingParserPool

extends Object

A parser pool that enables caching of grammars. The caching parser pool is constructed with a specific symbol table and grammar pool that has already been populated with the grammars used by the application.

Once the caching parser pool is constructed, specific parser instances are created by calling the appropriate factory method on the parser pool.

Note: There is a performance penalty for using a caching parser pool due to thread safety. Access to the symbol table and grammar pool must be synchronized to ensure the safe operation of the symbol table and grammar pool.

Note: If performance is critical, then another mechanism needs to be used instead of the caching parser pool. One approach would be to create parser instances that do not share these structures. Instead, each instance would get its own copy to use while parsing. This avoids the synchronization overhead at the expense of more memory and the time required to copy the structures for each new parser instance. And even when a parser instance is re-used, there is a potential for a memory leak due to new symbols being added to the symbol table over time. In other words, always take caution to make sure that your application is thread-safe and avoids leaking memory.

Nested Class Summary
`static class` | `CachingParserPool.ShadowedGrammarPool` Deprecated. Shadowed grammar pool.
`static class` | `CachingParserPool.SynchronizedGrammarPool` Deprecated. Synchronized grammar pool.

Field Summary
`static boolean` | `DEFAULT_SHADOW_GRAMMAR_POOL` Deprecated. Default shadow grammar pool (false).
`static boolean` | `DEFAULT_SHADOW_SYMBOL_TABLE` Deprecated. Default shadow symbol table (false).
`protected boolean` | `fShadowGrammarPool` Deprecated. Shadow the grammar pool for new parser instances.
`protected boolean` | `fShadowSymbolTable` Deprecated. Shadow the symbol table for new parser instances.
`protected XMLGrammarPool` | `fSynchronizedGrammarPool` Deprecated. Grammar pool.
`protected SymbolTable` | `fSynchronizedSymbolTable` Deprecated. Symbol table.

Constructor Summary
`CachingParserPool()` Deprecated. Default constructor.
`CachingParserPool(SymbolTable symbolTable, XMLGrammarPool grammarPool)` Deprecated. Constructs a caching parser pool with the specified symbol table and grammar pool.

Method Summary
`DOMParser` | `createDOMParser()` Deprecated. Creates a new DOM parser.
`SAXParser` | `createSAXParser()` Deprecated. Creates a new SAX parser.
`SymbolTable` | `getSymbolTable()` Deprecated. Returns the symbol table.
`XMLGrammarPool` | `getXMLGrammarPool()` Deprecated. Returns the grammar pool.
`void` | `setShadowSymbolTable(boolean shadow)` Deprecated. Sets whether new parser instance receive shadow copies of the main symbol table.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_SHADOW_SYMBOL_TABLE

    public static final boolean DEFAULT_SHADOW_SYMBOL_TABLE

  Deprecated.
  Default shadow symbol table (false).

  See Also:
    Constant Field Values

### DEFAULT_SHADOW_GRAMMAR_POOL

    public static final boolean DEFAULT_SHADOW_GRAMMAR_POOL

  Deprecated.
  Default shadow grammar pool (false).

  See Also:
    Constant Field Values

### fSynchronizedSymbolTable

    protected SymbolTable fSynchronizedSymbolTable

  Deprecated.
  Symbol table. The symbol table that the caching parser pool is constructed with is automatically wrapped in a synchronized version for thread-safety.

### fSynchronizedGrammarPool

    protected XMLGrammarPool fSynchronizedGrammarPool

  Deprecated.
  Grammar pool. The grammar pool that the caching parser pool is constructed with is automatically wrapped in a synchronized version for thread-safety.

### fShadowSymbolTable

    protected boolean fShadowSymbolTable

  Deprecated.
  Shadow the symbol table for new parser instances. If true, new parser instances use shadow copies of the main symbol table and are not allowed to add new symbols to the main symbol table. New symbols are added to the shadow symbol table and are local to the parser instance.

### fShadowGrammarPool

    protected boolean fShadowGrammarPool

  Deprecated.
  Shadow the grammar pool for new parser instances. If true, new parser instances use shadow copies of the main grammar pool and are not allowed to add new grammars to the main grammar pool. New grammars are added to the shadow grammar pool and are local to the parser instance.

Constructor Detail

### CachingParserPool

    public CachingParserPool()

  Deprecated.
  Default constructor.

### CachingParserPool

    public CachingParserPool(SymbolTable symbolTable,
                             XMLGrammarPool grammarPool)

  Deprecated.
  Constructs a caching parser pool with the specified symbol table and grammar pool.

  Parameters:
    `symbolTable` - The symbol table.
    `grammarPool` - The grammar pool.

Method Detail

### getSymbolTable

    public SymbolTable getSymbolTable()

  Deprecated.
  Returns the symbol table.

### getXMLGrammarPool

    public XMLGrammarPool getXMLGrammarPool()

  Deprecated.
  Returns the grammar pool.

### setShadowSymbolTable

    public void setShadowSymbolTable(boolean shadow)

  Deprecated.
  Sets whether new parser instance receive shadow copies of the main symbol table.

  Parameters:
    `shadow` - If true, new parser instances use shadow copies of the main symbol table and are not allowed to add new symbols to the main symbol table. New symbols are added to the shadow symbol table and are local to the parser instance. If false, new parser instances are allowed to add new symbols to the main symbol table.

### createDOMParser

    public DOMParser createDOMParser()

  Deprecated.
  Creates a new DOM parser.

### createSAXParser

    public SAXParser createSAXParser()

  Deprecated.
  Creates a new SAX parser.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs92 Copyright 2006 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD