cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r637185 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java rt/core/src/main/java/org/apache/cxf/bus/spring/ControlledValidationXmlBeanDefinitionReader.java
Date Fri, 14 Mar 2008 17:59:00 GMT
Author: dkulp
Date: Fri Mar 14 10:58:52 2008
New Revision: 637185

URL: http://svn.apache.org/viewvc?rev=637185&view=rev
Log:
Merged revisions 637027 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/cxf/trunk

........
  r637027 | bimargulies | 2008-03-14 05:53:32 -0400 (Fri, 14 Mar 2008) | 3 lines
  
  Suppress validation of CXF's spring config files. Add compatible name 
  for validation control variable.
........

Added:
    incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/ControlledValidationXmlBeanDefinitionReader.java
      - copied unchanged from r637027, incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/ControlledValidationXmlBeanDefinitionReader.java
Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java

Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java?rev=637185&r1=637184&r2=637185&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java
Fri Mar 14 10:58:52 2008
@@ -33,9 +33,11 @@
 
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.configuration.Configurer;
+import org.springframework.beans.factory.support.DefaultListableBeanFactory;
 import org.springframework.beans.factory.xml.BeansDtdResolver;
 import org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver;
 import org.springframework.beans.factory.xml.PluggableSchemaResolver;
+import org.springframework.beans.factory.xml.ResourceEntityResolver;
 import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -193,7 +195,10 @@
         }
         reader.setNamespaceHandlerResolver(nsHandlerResolver);
         
-        String mode = System.getProperty("spring.validation.mode");
+        String mode = System.getProperty("org.apache.cxf.spring.validation.mode");
+        if (mode == null) {
+            mode = System.getProperty("spring.validation.mode");
+        }
         if (null != mode) {
             reader.setValidationModeName(mode);
         }
@@ -206,6 +211,22 @@
         ClassLoader cl = Thread.currentThread().getContextClassLoader();
         reader.setEntityResolver(new BusEntityResolver(new BeansDtdResolver(),
             new PluggableSchemaResolver(cl)));
+    }
+    @Override
+    protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException
{
+            // Create a new XmlBeanDefinitionReader for the given BeanFactory.
+        XmlBeanDefinitionReader beanDefinitionReader = 
+            new ControlledValidationXmlBeanDefinitionReader(beanFactory);
+        
+        // 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);
     }
     
 }



Mime
View raw message