Skip to content

Commit

Permalink
Default activitiSchemaUpdate is driven by hibernateHbm2ddl setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Jun 20, 2016
1 parent 2ecb4c3 commit 38fe6c0
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -144,7 +144,7 @@ void initialize() {
}

dataSource = c.getString(KEY_DATA_SOURCE, null);
if (dataSource == null && explicitJdbcUrl == null) {
if (dataSource == null && explicitJdbcUrl == null && sqlConfig != null) {
dataSource = sqlConfig.getDataSource(); // we want to use wf-specific JDBC if there is one (i.e. we do not want to inherit data source from repo in such a case)
}

Expand All @@ -154,7 +154,10 @@ void initialize() {
LOGGER.info("Activiti database is at " + jdbcUrl + " (a JDBC URL)");
}

activitiSchemaUpdate = c.getBoolean(KEY_ACTIVITI_SCHEMA_UPDATE, true);
boolean defaultSchemaUpdate = sqlConfig == null || "update".equals(sqlConfig.getHibernateHbm2ddl());
activitiSchemaUpdate = c.getBoolean(KEY_ACTIVITI_SCHEMA_UPDATE, defaultSchemaUpdate);
LOGGER.info("Activiti automatic schema update: {}", activitiSchemaUpdate);

jdbcDriver = c.getString(KEY_JDBC_DRIVER, sqlConfig != null ? sqlConfig.getDriverClassName() : null);
jdbcUser = c.getString(KEY_JDBC_USERNAME, sqlConfig != null ? sqlConfig.getJdbcUsername() : null);
jdbcPassword = c.getString(KEY_JDBC_PASSWORD, sqlConfig != null ? sqlConfig.getJdbcPassword() : null);
Expand Down

0 comments on commit 38fe6c0

Please sign in to comment.