Apache CXF API

org.apache.cxf.bus.spring
Class ControlledValidationXmlBeanDefinitionReader

java.lang.Object
  extended by XmlBeanDefinitionReader
      extended by org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader

public class ControlledValidationXmlBeanDefinitionReader
extends XmlBeanDefinitionReader

CXF reads a series of Spring XML files as part of initialization. The time it takes to parse them, especially if validating, builds up. The XML files shipped in a release in the JARs are valid and invariant. To speed things up, this class implements two levels of optimization. When a CXF distribution is fully-packaged, each of the Spring XML bus extension .xml files is accompanied by a FastInfoset '.fixml' file. These read much more rapidly. When one of those is present, this classs reads it instead of reading the XML text file. Absent a .fixml file, this class uses WoodStox instead of Xerces (or whatever the JDK is providing). The Woodstox optimization also applies to user cxf.xml or cxf-servlet.xml files if the user has disabled XML validation of Spring files with the org.apache.cxf.spring.validation.mode system property. Note that the fastInfoset optimization is only applied for the methods here that start from a Resource. If this is called with an InputSource, that optimization is not applied, since we can't reliably know the location of the XML.


Constructor Summary
ControlledValidationXmlBeanDefinitionReader(BeanDefinitionRegistry beanFactory)
           
 
Method Summary
protected  int doLoadBeanDefinitions(InputSource inputSource, Resource resource)
           
 int loadBeanDefinitions(EncodedResource encodedResource)
           
 void setValidationMode(int validationMode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControlledValidationXmlBeanDefinitionReader

public ControlledValidationXmlBeanDefinitionReader(BeanDefinitionRegistry beanFactory)
Parameters:
beanFactory -
Method Detail

doLoadBeanDefinitions

protected int doLoadBeanDefinitions(InputSource inputSource,
                                    Resource resource)
                             throws BeanDefinitionStoreException
Throws:
BeanDefinitionStoreException

setValidationMode

public void setValidationMode(int validationMode)

loadBeanDefinitions

public int loadBeanDefinitions(EncodedResource encodedResource)
                        throws BeanDefinitionStoreException
Throws:
BeanDefinitionStoreException

Apache CXF API

Apache CXF