Don't load database if it's not in use

This commit is contained in:
h31ix committed 2013-10-11 18:46:04 -04:00
1 parent 9486e18c4f
commit 6d40fbca9a
1 file changed
+2
@@ -65,6 +65,7 @@ public class Enterprise extends ConfigurationFile {
ConfigValue<String> databaseSchema = new ConfigValue<String>("database.database");
ConfigValue<Integer> databasePort = new ConfigValue<Integer>("database.port");
if (getConfiguration().getConfig().enterprise.getValue()) {
// Convert database values to Database
database = new Database(
Database.DatabaseType.valueOf(databaseType.getValue()),
@@ -81,4 +82,5 @@ public class Enterprise extends ConfigurationFile {
database.connect();
}
}
}