3.3.1 Overview of the schema cache functionality
The schema cache functionality caches, in an object state, the syntax definitions that an XML parser acquires when parsing schema documents, and enables the re-use of the cached syntax definitions during schema validation to improve the speed of validation parsing.
With the schema cache functionality, you can create a cache in the memory and on a disk. Also, you can use a program in which APIs of JAXP1.2 are used to improve the execution speed of validation parsing without modifying the source.
This subsection describes the prerequisites and scope for using the schema cache functionality.
- Organization of this subsection
(1) Prerequisite conditions
The schema cache functionality is enabled only when a user program that runs on a J2EE server uses the javax.xml.parsers.DocumentBuilder class (DOM parse) to parse XML documents.
The following are the restrictions when using the schema cache functionality:
-
The schema cache functionality is not applicable to the schema validation using the javax.xml.validation package.
-
When passing the File object to an argument of the parse method, some part of the name of the schema document file that is maintained within the parse will not be in conformity with the name of the file that is created while setting up a cache. Therefore, you cannot use the schema cache functionality.
(2) Scope
The following schema documents will be cached:
-
Schema documents specified in the schema definition file
-
Schema documents are referenced directly or indirectly from the schema documents that are defined in the schema definition file, with the following elements:
-
import element
-
include element
-
redefine element
-
Note that when starting multiple J2EE servers on one machine, the schema cache functionality operates independently on every J2EE server.