[Yanel-commits] rev 24501 - public/yanel/trunk/src/core/java/org/wyona/yanel/core/map

michi at wyona.com michi at wyona.com
Tue May 15 16:02:21 CEST 2007


Author: michi
Date: 2007-05-15 16:02:19 +0200 (Tue, 15 May 2007)
New Revision: 24501

Modified:
   public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmManager.java
Log:
log message fixed and use yanel config from centralized yanel class

Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmManager.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmManager.java	2007-05-15 14:01:44 UTC (rev 24500)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmManager.java	2007-05-15 14:02:19 UTC (rev 24501)
@@ -57,9 +57,7 @@
 
     private static Category log = Category.getInstance(RealmManager.class);
 
-    public static final String DEFAULT_CONFIGURATION_FILE = "yanel.properties";
-    public static final String DEFAULT_CONFIGURATION_FILE_XML = "yanel.xml";
-    public static String CONFIGURATION_FILE = DEFAULT_CONFIGURATION_FILE;
+    public static String CONFIGURATION_FILE = Yanel.DEFAULT_CONFIGURATION_FILE;
 
     public static String REALM_DEFAULT_CONFIG_NAME = "realm.xml";
 
@@ -75,7 +73,7 @@
      *
      */
     public RealmManager() throws ConfigurationException {
-        this(DEFAULT_CONFIGURATION_FILE_XML);
+        this(Yanel.DEFAULT_CONFIGURATION_FILE_XML);
     }
 
     /**
@@ -85,7 +83,7 @@
         CONFIGURATION_FILE = configurationFile;
 
         if (RealmManager.class.getClassLoader().getResource(CONFIGURATION_FILE) == null) {
-            CONFIGURATION_FILE = DEFAULT_CONFIGURATION_FILE;
+            CONFIGURATION_FILE = Yanel.DEFAULT_CONFIGURATION_FILE;
         }
 
         if (RealmManager.class.getClassLoader().getResource(CONFIGURATION_FILE) != null) {
@@ -142,15 +140,14 @@
                     // assignRepositories();
                 } catch (IOException e) {
                     log.error(e.getMessage(), e);
-                    throw new ConfigurationException("Could not load realms configuration file: "
-                            + propertiesURL);
+                    throw new ConfigurationException("Could not load realms configuration file: " + propertiesURL);
                 }
             } else {
-                log.error(CONFIGURATION_FILE + "have to be either .xml or .properties");
+                log.error(CONFIGURATION_FILE + " has to be either .xml or .properties");
             }
-            log.error("No such configuration file" + CONFIGURATION_FILE);
+        } else {
+            log.error("No such configuration file: " + RealmManager.class.getClassLoader().getResource(CONFIGURATION_FILE));
         }
-
     }
 
     /**




More information about the Yanel-commits mailing list