Author: gmazza
Date: Fri Apr 11 22:05:28 2014
New Revision: 1586787
URL: http://svn.apache.org/r1586787
Log:
Clarified a bit how runtimeConfigDefs.xml used in Roller.
Modified:
roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPropertiesManagerImpl.java
roller/trunk/app/src/main/resources/org/apache/roller/weblogger/config/runtimeConfigDefs.xml
Modified:
roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPropertiesManagerImpl.java
URL:
http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPropertiesManagerImpl.java?rev=1586787&r1=1586786&r2=1586787&view=diff
==============================================================================
---
roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPropertiesManagerImpl.java
(original)
+++
roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPropertiesManagerImpl.java
Fri Apr 11 22:05:28 2014
@@ -69,11 +69,14 @@ public class JPAPropertiesManagerImpl im
Map<String, RuntimeConfigProperty> props;
try {
+ // retrieve properties from database
props = this.getProperties();
- initializeMissingProps(props);
- // save our changes
+ // if any default props missing from the properties DB table,
+ // initialize them and save them to that table.
+ initializeMissingProps(props);
this.saveProperties(props);
+
} catch (Exception e) {
log.fatal("Failed to initialize runtime configuration properties."+
"Please check that the database has been upgraded!", e);
@@ -174,10 +177,9 @@ public class JPAPropertiesManagerImpl im
props.put(propDef.getName(), newprop);
- log.info("Found uninitialized property " +
- propDef.getName() +
- " ... setting value to [" +
- propDef.getDefaultValue() + "`]");
+ log.info("Property " + propDef.getName() +
+ " not yet in roller_properties database table,
will store with " +
+ "default value of [" + propDef.getDefaultValue() +
"`]");
}
}
}
Modified:
roller/trunk/app/src/main/resources/org/apache/roller/weblogger/config/runtimeConfigDefs.xml
URL:
http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/org/apache/roller/weblogger/config/runtimeConfigDefs.xml?rev=1586787&r1=1586786&r2=1586787&view=diff
==============================================================================
---
roller/trunk/app/src/main/resources/org/apache/roller/weblogger/config/runtimeConfigDefs.xml
(original)
+++
roller/trunk/app/src/main/resources/org/apache/roller/weblogger/config/runtimeConfigDefs.xml
Fri Apr 11 22:05:28 2014
@@ -19,13 +19,13 @@
<!--
STOP!!!! This is NOT a Roller configuration file!!
- Users of Roller should never need to edit this file. The properties listed
- here are changed on the Roller Admin Settings page.
+ Users of Roller should never need to edit this file. The properties
+ listed here should instead be changed on the Roller Admin Settings page.
This file defines what properties are made available to get/set
during the running of the Roller application. These properties
- are stored in the database and the code *must* be able to make
- use of changed values during runtime.
+ are stored in the database (roller_properties table) and the code *must* be
+ able to make use of changed values during runtime.
Also included in this file is meta-data which defines what class
of property we are dealing with, it's default value, and information