@Override public int loadBeanDefinitions(final EncodedResource encodedResource) throws BeanDefinitionStoreException { if (!noFastinfoset) { try { return fastInfosetLoadBeanDefinitions(encodedResource); } catch (BeanDefinitionStoreException bdse) { throw bdse; } catch (Throwable e) { //ignore - just call the super to load them } } try { return AccessController.doPrivileged(new PrivilegedExceptionAction<Integer>() { public Integer run() throws Exception { return internalLoadBeanDefinitions(encodedResource); } }); } catch (PrivilegedActionException e) { if (e.getException() instanceof RuntimeException) { throw (RuntimeException)e.getException(); } throw (BeanDefinitionStoreException)e.getException(); } }
@Override protected int doLoadBeanDefinitions(InputSource inputSource, Resource resource) throws BeanDefinitionStoreException { // sadly, the Spring class we are extending has the critical function // getValidationModeForResource // marked private instead of protected, so trickery is called for here. boolean suppressValidation = false; try { URL url = resource.getURL(); if (url.getFile().contains("META-INF/cxf/")) { suppressValidation = true; } } catch (IOException e) { // this space intentionally left blank. } int savedValidation = visibleValidationMode; if (suppressValidation) { setValidationMode(VALIDATION_NONE); } int r = super.doLoadBeanDefinitions(inputSource, resource); setValidationMode(savedValidation); return r; }
/** * @param beanFactory */ public ControlledValidationXmlBeanDefinitionReader(BeanDefinitionRegistry beanFactory) { super(beanFactory); tunedDocumentLoader = new TunedDocumentLoader(); this.setDocumentLoader(tunedDocumentLoader); noFastinfoset = SystemPropertyAction.getPropertyOrNull("org.apache.cxf.nofastinfoset") != null || !TunedDocumentLoader.hasFastInfoSet(); }
@Override protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException { // Create a new XmlBeanDefinitionReader for the given BeanFactory. XmlBeanDefinitionReader beanDefinitionReader = new ControlledValidationXmlBeanDefinitionReader(beanFactory); beanDefinitionReader.setNamespaceHandlerResolver(nsHandlerResolver); // Configure the bean definition reader with this context's // resource loading environment. beanDefinitionReader.setResourceLoader(this); beanDefinitionReader.setEntityResolver(new ResourceEntityResolver(this)); // Allow a subclass to provide custom initialization of the reader, // then proceed with actually loading the bean definitions. initBeanDefinitionReader(beanDefinitionReader); loadBeanDefinitions(beanDefinitionReader); }
return registerBeanDefinitions(doc, newResource);
/** * @param beanFactory */ public ControlledValidationXmlBeanDefinitionReader(BeanDefinitionRegistry beanFactory) { super(beanFactory); tunedDocumentLoader = new TunedDocumentLoader(); this.setDocumentLoader(tunedDocumentLoader); noFastinfoset = SystemPropertyAction.getPropertyOrNull("org.apache.cxf.nofastinfoset") != null || !TunedDocumentLoader.hasFastInfoSet(); }
@Override protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException { // Create a new XmlBeanDefinitionReader for the given BeanFactory. XmlBeanDefinitionReader beanDefinitionReader = new ControlledValidationXmlBeanDefinitionReader(beanFactory); beanDefinitionReader.setNamespaceHandlerResolver(nsHandlerResolver); // Configure the bean definition reader with this context's // resource loading environment. beanDefinitionReader.setResourceLoader(this); beanDefinitionReader.setEntityResolver(new ResourceEntityResolver(this)); // Allow a subclass to provide custom initialization of the reader, // then proceed with actually loading the bean definitions. initBeanDefinitionReader(beanDefinitionReader); loadBeanDefinitions(beanDefinitionReader); }
return registerBeanDefinitions(doc, newResource);
/** * @param beanFactory */ public ControlledValidationXmlBeanDefinitionReader(BeanDefinitionRegistry beanFactory) { super(beanFactory); tunedDocumentLoader = new TunedDocumentLoader(); this.setDocumentLoader(tunedDocumentLoader); noFastinfoset = SystemPropertyAction.getPropertyOrNull("org.apache.cxf.nofastinfoset") != null || !TunedDocumentLoader.hasFastInfoSet(); }
@Override protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException { // Create a new XmlBeanDefinitionReader for the given BeanFactory. XmlBeanDefinitionReader beanDefinitionReader = new ControlledValidationXmlBeanDefinitionReader(beanFactory); beanDefinitionReader.setNamespaceHandlerResolver(nsHandlerResolver); // Configure the bean definition reader with this context's // resource loading environment. beanDefinitionReader.setResourceLoader(this); beanDefinitionReader.setEntityResolver(new ResourceEntityResolver(this)); // Allow a subclass to provide custom initialization of the reader, // then proceed with actually loading the bean definitions. initBeanDefinitionReader(beanDefinitionReader); loadBeanDefinitions(beanDefinitionReader); }
@Override public int loadBeanDefinitions(final EncodedResource encodedResource) throws BeanDefinitionStoreException { if (!noFastinfoset) { try { return fastInfosetLoadBeanDefinitions(encodedResource); } catch (BeanDefinitionStoreException bdse) { throw bdse; } catch (Throwable e) { //ignore - just call the super to load them } } try { return AccessController.doPrivileged(new PrivilegedExceptionAction<Integer>() { public Integer run() throws Exception { return internalLoadBeanDefinitions(encodedResource); } }); } catch (PrivilegedActionException e) { if (e.getException() instanceof RuntimeException) { throw (RuntimeException)e.getException(); } throw (BeanDefinitionStoreException)e.getException(); } }
@Override protected int doLoadBeanDefinitions(InputSource inputSource, Resource resource) throws BeanDefinitionStoreException { // sadly, the Spring class we are extending has the critical function // getValidationModeForResource // marked private instead of protected, so trickery is called for here. boolean suppressValidation = false; try { URL url = resource.getURL(); if (url.getFile().contains("META-INF/cxf/")) { suppressValidation = true; } } catch (IOException e) { // this space intentionally left blank. } int savedValidation = visibleValidationMode; if (suppressValidation) { setValidationMode(VALIDATION_NONE); } int r = super.doLoadBeanDefinitions(inputSource, resource); setValidationMode(savedValidation); return r; }
return registerBeanDefinitions(doc, newResource);
/** * @param beanFactory */ public ControlledValidationXmlBeanDefinitionReader(BeanDefinitionRegistry beanFactory) { super(beanFactory); tunedDocumentLoader = new TunedDocumentLoader(); this.setDocumentLoader(tunedDocumentLoader); noFastinfoset = SystemPropertyAction.getPropertyOrNull("org.apache.cxf.nofastinfoset") != null || !TunedDocumentLoader.hasFastInfoSet(); }
@Override protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException { // Create a new XmlBeanDefinitionReader for the given BeanFactory. XmlBeanDefinitionReader beanDefinitionReader = new ControlledValidationXmlBeanDefinitionReader(beanFactory); beanDefinitionReader.setNamespaceHandlerResolver(nsHandlerResolver); // Configure the bean definition reader with this context's // resource loading environment. beanDefinitionReader.setResourceLoader(this); beanDefinitionReader.setEntityResolver(new ResourceEntityResolver(this)); // Allow a subclass to provide custom initialization of the reader, // then proceed with actually loading the bean definitions. initBeanDefinitionReader(beanDefinitionReader); loadBeanDefinitions(beanDefinitionReader); }
@Override public int loadBeanDefinitions(final EncodedResource encodedResource) throws BeanDefinitionStoreException { if (!noFastinfoset) { try { return fastInfosetLoadBeanDefinitions(encodedResource); } catch (BeanDefinitionStoreException bdse) { throw bdse; } catch (Throwable e) { //ignore - just call the super to load them } } try { return AccessController.doPrivileged(new PrivilegedExceptionAction<Integer>() { public Integer run() throws Exception { return internalLoadBeanDefinitions(encodedResource); } }); } catch (PrivilegedActionException e) { if (e.getException() instanceof RuntimeException) { throw (RuntimeException)e.getException(); } throw (BeanDefinitionStoreException)e.getException(); } }
@Override protected int doLoadBeanDefinitions(InputSource inputSource, Resource resource) throws BeanDefinitionStoreException { // sadly, the Spring class we are extending has the critical function // getValidationModeForResource // marked private instead of protected, so trickery is called for here. boolean suppressValidation = false; try { URL url = resource.getURL(); if (url.getFile().contains("META-INF/cxf/")) { suppressValidation = true; } } catch (IOException e) { // this space intentionally left blank. } int savedValidation = visibleValidationMode; if (suppressValidation) { setValidationMode(VALIDATION_NONE); } int r = super.doLoadBeanDefinitions(inputSource, resource); setValidationMode(savedValidation); return r; }
return registerBeanDefinitions(doc, newResource);
@Override public int loadBeanDefinitions(final EncodedResource encodedResource) throws BeanDefinitionStoreException { if (!noFastinfoset) { try { return fastInfosetLoadBeanDefinitions(encodedResource); } catch (BeanDefinitionStoreException bdse) { throw bdse; } catch (Throwable e) { //ignore - just call the super to load them } } try { return AccessController.doPrivileged(new PrivilegedExceptionAction<Integer>() { public Integer run() throws Exception { return internalLoadBeanDefinitions(encodedResource); } }); } catch (PrivilegedActionException e) { if (e.getException() instanceof RuntimeException) { throw (RuntimeException)e.getException(); } throw (BeanDefinitionStoreException)e.getException(); } }
@Override protected int doLoadBeanDefinitions(InputSource inputSource, Resource resource) throws BeanDefinitionStoreException { // sadly, the Spring class we are extending has the critical function // getValidationModeForResource // marked private instead of protected, so trickery is called for here. boolean suppressValidation = false; try { URL url = resource.getURL(); if (url.getFile().contains("META-INF/cxf/")) { suppressValidation = true; } } catch (IOException e) { // this space intentionally left blank. } int savedValidation = visibleValidationMode; if (suppressValidation) { setValidationMode(VALIDATION_NONE); } int r = super.doLoadBeanDefinitions(inputSource, resource); setValidationMode(savedValidation); return r; }