=== modified file 'dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/ConnectionPropertyFactoryBean.java' --- dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/ConnectionPropertyFactoryBean.java 2011-12-26 10:07:59 +0000 +++ dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/ConnectionPropertyFactoryBean.java 2012-12-12 12:28:49 +0000 @@ -27,6 +27,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; import org.springframework.beans.factory.FactoryBean; /** @@ -53,6 +55,13 @@ { this.hibernateProperty = hibernateProperty; } + + private String defaultValue; + + public void setDefaultValue( String defaultValue ) + { + this.defaultValue = defaultValue; + } // ------------------------------------------------------------------------- // FactoryBean implementation @@ -61,7 +70,9 @@ public String getObject() throws Exception { - return hibernateConfigurationProvider.getConfiguration().getProperty( hibernateProperty ); + String value = hibernateConfigurationProvider.getConfiguration().getProperty( hibernateProperty ); + + return StringUtils.defaultIfEmpty( value, defaultValue ); } public Class getObjectType() === modified file 'dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/META-INF/dhis/beans.xml 2012-03-31 15:08:23 +0000 +++ dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/META-INF/dhis/beans.xml 2012-12-12 12:28:49 +0000 @@ -55,8 +55,8 @@ + - @@ -84,5 +84,11 @@ - + + + + + + +