cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r629485 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/bus/spring/ tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/ tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/proce...
Date Wed, 20 Feb 2008 14:55:58 GMT
Author: dkulp
Date: Wed Feb 20 06:55:50 2008
New Revision: 629485

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

........
  r629228 | dkulp | 2008-02-19 16:02:23 -0500 (Tue, 19 Feb 2008) | 2 lines
  
  [CXF-737, CXF-1435] Allow multiple URLS for spring config, fix for Spring 2.5.2
........

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
    incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java
    incubator/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java
    incubator/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/Wrapper.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=629485&r1=629484&r2=629485&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
Wed Feb 20 06:55:50 2008
@@ -53,27 +53,40 @@
     
     private DefaultNamespaceHandlerResolver nsHandlerResolver;
     private boolean includeDefaults;
-    private String cfgFile;
-    private URL cfgFileURL;
+    private String[] cfgFiles;
+    private URL[] cfgFileURLs;
     
     public BusApplicationContext(String cf, boolean include) {
         this(cf, include, null);
     }
+    public BusApplicationContext(String[] cfs, boolean include) {
+        this(cfs, include, null);
+    }
     
     public BusApplicationContext(URL url, boolean include) {
         this(url, include, null);
     }
+    public BusApplicationContext(URL[] urls, boolean include) {
+        this(urls, include, null);
+    }
 
     public BusApplicationContext(String cf, boolean include, ApplicationContext parent) {
-        super((String[])null, false, parent);
-        cfgFile = cf;
+        this(new String[] {cf}, include, parent);
+    }
+    
+    public BusApplicationContext(URL url, boolean include, ApplicationContext parent) {
+        this(new URL[] {url}, include, parent);
+    } 
+    public BusApplicationContext(String[] cf, boolean include, ApplicationContext parent)
{
+        super(new String[0], false, parent);
+        cfgFiles = cf;
         includeDefaults = include;
         refresh();
     }
     
-    public BusApplicationContext(URL url, boolean include, ApplicationContext parent) {
-        super((String[])null, false, parent);
-        cfgFileURL = url;
+    public BusApplicationContext(URL[] url, boolean include, ApplicationContext parent) {
+        super(new String[0], false, parent);
+        cfgFileURLs = url;
         includeDefaults = include;
         refresh();
     } 
@@ -110,31 +123,38 @@
         }
         
         boolean usingDefault = false;
-        if (null == cfgFile) {
-            cfgFile = System.getProperty(Configurer.USER_CFG_FILE_PROPERTY_NAME);
+        if (null == cfgFiles) {
+            String cfgFile = System.getProperty(Configurer.USER_CFG_FILE_PROPERTY_NAME);
+            if (cfgFile != null) {
+                cfgFiles = new String[] {cfgFile};
+            }
         }        
-        if (null == cfgFile) {
-            cfgFile = Configurer.DEFAULT_USER_CFG_FILE;
+        if (null == cfgFiles) {
+            cfgFiles = new String[] {Configurer.DEFAULT_USER_CFG_FILE};
             usingDefault = true;
         }
-        ClassPathResource cpr = new ClassPathResource(cfgFile);
-        if (cpr.exists()) {
-            resources.add(cpr);
-        } else {
-            if (!usingDefault) {
-                LogUtils.log(LOG, Level.INFO, "USER_CFG_FILE_NOT_FOUND_MSG", cfgFile);
+        for (String cfgFile : cfgFiles) {
+            ClassPathResource cpr = new ClassPathResource(cfgFile);
+            if (cpr.exists()) {
+                resources.add(cpr);
             } else {
-                LogUtils.log(LOG, Level.FINE, "USER_CFG_FILE_NOT_FOUND_MSG", cfgFile);
+                if (!usingDefault) {
+                    LogUtils.log(LOG, Level.WARNING, "USER_CFG_FILE_NOT_FOUND_MSG", cfgFile);
+                } else {
+                    LogUtils.log(LOG, Level.INFO, "USER_CFG_FILE_NOT_SPECIFIED_MSG", cfgFile);
+                }
             }
         }
-        
-        if (null != cfgFileURL) {
-            UrlResource ur = new UrlResource(cfgFileURL);
-            if (ur.exists()) {
-                resources.add(ur);
-            } else {
-                LogUtils.log(LOG, Level.INFO, "USER_CFG_FILE_URL_NOT_FOUND_MSG", cfgFileURL);
-            }    
+            
+        if (null != cfgFileURLs) {
+            for (URL cfgFileURL : cfgFileURLs) {
+                UrlResource ur = new UrlResource(cfgFileURL);
+                if (ur.exists()) {
+                    resources.add(ur);
+                } else {
+                    LogUtils.log(LOG, Level.WARNING, "USER_CFG_FILE_URL_NOT_FOUND_MSG", cfgFileURL);
+                }
+            }
         } 
         
         String sysCfgFileUrl = System.getProperty(Configurer.USER_CFG_FILE_PROPERTY_URL);
@@ -144,10 +164,10 @@
                 if (ur.exists()) {
                     resources.add(ur);
                 } else {
-                    LogUtils.log(LOG, Level.INFO, "USER_CFG_FILE_URL_NOT_FOUND_MSG", sysCfgFileUrl);
+                    LogUtils.log(LOG, Level.WARNING, "USER_CFG_FILE_URL_NOT_FOUND_MSG", sysCfgFileUrl);
                 }            
             } catch (MalformedURLException e) {            
-                LogUtils.log(LOG, Level.INFO, "USER_CFG_FILE_URL_ERROR_MSG", sysCfgFileUrl);
+                LogUtils.log(LOG, Level.WARNING, "USER_CFG_FILE_URL_ERROR_MSG", sysCfgFileUrl);
             }
         }
         

Modified: incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java?rev=629485&r1=629484&r2=629485&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java
Wed Feb 20 06:55:50 2008
@@ -64,6 +64,9 @@
     public Bus createBus(String cfgFile) {
         return createBus(cfgFile, defaultBusNotExists());
     }
+    public Bus createBus(String cfgFiles[]) {
+        return createBus(cfgFiles, defaultBusNotExists());
+    }
         
     private Bus finishCreatingBus(BusApplicationContext bac) {
         final Bus bus = (Bus)bac.getBean(Bus.DEFAULT_BUS_ID);
@@ -80,8 +83,14 @@
     }
     
     public Bus createBus(String cfgFile, boolean includeDefaults) {
+        if (cfgFile == null) {
+            return createBus((String[])null, includeDefaults);
+        }
+        return createBus(new String[] {cfgFile}, includeDefaults);
+    }    
+    public Bus createBus(String cfgFiles[], boolean includeDefaults) {
         try {      
-            return finishCreatingBus(new BusApplicationContext(cfgFile, includeDefaults,
context));
+            return finishCreatingBus(new BusApplicationContext(cfgFiles, includeDefaults,
context));
         } catch (BeansException ex) {
             LogUtils.log(LOG, Level.WARNING, "APP_CONTEXT_CREATION_FAILED_MSG", ex, (Object[])null);
             throw new RuntimeException(ex);
@@ -91,10 +100,19 @@
     public Bus createBus(URL url) {
         return createBus(url, defaultBusNotExists());
     }
+    public Bus createBus(URL[] urls) {
+        return createBus(urls, defaultBusNotExists());
+    }
     
     public Bus createBus(URL url, boolean includeDefaults) {
+        if (url == null) {
+            return createBus((URL[])null, includeDefaults);
+        }
+        return createBus(new URL[] {url}, includeDefaults);
+    }
+    public Bus createBus(URL[] urls, boolean includeDefaults) {
         try {      
-            return finishCreatingBus(new BusApplicationContext(url, includeDefaults, context));
+            return finishCreatingBus(new BusApplicationContext(urls, includeDefaults, context));
         } catch (BeansException ex) {
             LogUtils.log(LOG, Level.WARNING, "APP_CONTEXT_CREATION_FAILED_MSG", ex, (Object[])null);
             throw new RuntimeException(ex);

Modified: incubator/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java?rev=629485&r1=629484&r2=629485&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java
Wed Feb 20 06:55:50 2008
@@ -84,11 +84,11 @@
 
     public void process() throws ToolException {
         String oldClassPath = System.getProperty(JAVA_CLASS_PATH);
-        LOG.log(Level.INFO, "OLD_CP", oldClassPath);
+        LOG.log(Level.FINE, "OLD_CP", oldClassPath);
         if (context.get(ToolConstants.CFG_CLASSPATH) != null) {
             String newCp = (String)context.get(ToolConstants.CFG_CLASSPATH);
             System.setProperty(JAVA_CLASS_PATH, newCp + File.pathSeparator + oldClassPath);
-            LOG.log(Level.INFO, "NEW_CP", newCp);
+            LOG.log(Level.FINE, "NEW_CP", newCp);
         }
 
         ServiceBuilder builder = getServiceBuilder();
@@ -114,7 +114,7 @@
         serviceList.add(service);
         context.put(ToolConstants.SERVICE_LIST, serviceList);
         System.setProperty(JAVA_CLASS_PATH, oldClassPath);
-        LOG.log(Level.INFO, "RESUME_CP", oldClassPath);
+        LOG.log(Level.FINE, "RESUME_CP", oldClassPath);
     }
 
     private AbstractGenerator getWrapperBeanGenerator() {

Modified: incubator/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/Wrapper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/Wrapper.java?rev=629485&r1=629484&r2=629485&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/Wrapper.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/Wrapper.java
Wed Feb 20 06:55:50 2008
@@ -151,7 +151,7 @@
     public boolean isWrapperBeanClassNotExist() {
         try {
             Message msg = new Message("LOADING_WRAPPER_CLASS", LOG, getJavaClass().getFullClassName());
-            LOG.log(Level.INFO, msg.toString());
+            LOG.log(Level.FINE, msg.toString());
             getWrapperClass();
             return false;
         } catch (ToolException e) {
@@ -169,7 +169,7 @@
                                             getClass().getClassLoader());
         } catch (Exception e) {
             Message msg = new Message("LOAD_WRAPPER_CLASS_FAILED", LOG, getJavaClass().getFullClassName());
-            LOG.log(Level.WARNING, msg.toString());
+            LOG.log(Level.FINE, msg.toString());
             throw new ToolException(msg);
         }
     }



Mime
View raw message