Unable to override DbSqlSessionFactory via spring config

Description

I'm unable to use a custom DbSqlSessionFactory via the ProcessEngineConfigurationImpl.setDbSqlSessionFactory() method from Spring. The reason is the ProcessEngineConfigurationImpl.initSessionFactories() method overwrites the value.

The fix is to add a null check to the initiSessionFactories method to prevent it from overriding a user defined value.

protected void initSessionFactories() {
....
if(null == dbSqlSessionFactory)
{
dbSqlSessionFactory = new DbSqlSessionFactory();
}
...
}

Pull Request: https://github.com/Activiti/Activiti/pull/558

Assignee

Joram Barrez

Reporter

Robert Hafner

Labels

None

Components

Fix versions

Priority

Minor
Configure