Minor change to how db connection parameters are supplied for session factory creation to avoid changing anything in Middleware.