Merge branch 'hotfix/5382'

Close #5382
Fixes #4954
[#5254] Pre-process configuration to inject DB adapter instance

- Looks for a named DB adapter in the writer configuration, and, if
  found, retrieves it from the service locator passed to the factory,
  re-setting the db configuration to use the discovered adapter.
Forward port #5254
Merge branch 'weierophinney-hotfix/5254' into develop

* weierophinney-hotfix/5254:
  [#5254] Pre-process configuration to inject DB adapter instance