Object used to build a schema from a schema document. This object includes a cache of previously resolved
schema documents. This cache might be useful when an application has multiple webservices that each have
WSDL documents that import the same schema, for example. On app startup, we may wish to cache XmlSchema
objects so we don't build up the schema graph multiple times. key - use a combination of thread id and all
three parameters passed to resolveXmlSchema to give minimal thread safety value - XmlSchema object wrapped
in a SoftReference to encourage GC in low memory situations. CAUTION: XmlSchema objects are not likely to
be thread-safe. This cache should only be used, then cleared, by callers aware of its existence. It is VERY
important that users of this cache call clearCache() after they are done. Usage of the cache is controlled
by calling initCache() which will initialize resolvedSchemas to non-null. Clearing of cache is done by
calling clearCache() which will clear and nullify resolvedSchemas
Remove any entries from the cache for the current thread. Entries for other threads are not altered.
public static void initCache()
Setup the cache to be used by the current thread of execution. Multiple threads can use the cache, and
each one must call this method at some point prior to attempting to resolve the first schema, or the
cache will not be used on that thread. IMPORTANT: The thread MUST call clearCache() when it is done
with the schemas or a large amount of memory may remain in-use.