/**
   * Creates the database config service.
   *
   * @param configSnapshot is the config snapshot
   * @param schedulingService is the timer stuff
   * @param schedulingMgmtService for statement schedule management
   * @return database config svc
   */
  protected static DatabaseConfigService makeDatabaseRefService(
      ConfigurationInformation configSnapshot,
      SchedulingService schedulingService,
      SchedulingMgmtService schedulingMgmtService) {
    DatabaseConfigService databaseConfigService;

    // Add auto-imports
    try {
      ScheduleBucket allStatementsBucket = schedulingMgmtService.allocateBucket();
      databaseConfigService =
          new DatabaseConfigServiceImpl(
              configSnapshot.getDatabaseReferences(), schedulingService, allStatementsBucket);
    } catch (IllegalArgumentException ex) {
      throw new ConfigurationException("Error configuring engine: " + ex.getMessage(), ex);
    }

    return databaseConfigService;
  }