protected <T extends Service> void applyInjections(T service) {
    try {
      for (Method method : service.getClass().getMethods()) {
        InjectService injectService = method.getAnnotation(InjectService.class);
        if (injectService == null) {
          continue;
        }

        applyInjection(service, method, injectService);
      }
    } catch (NullPointerException e) {
      LOG.error("NPE injecting service deps : " + service.getClass().getName());
    }
  }
Ejemplo n.º 2
0
 private void perform(String[] sqlCommands, List<Exporter> exporters) {
   for (String sqlCommand : sqlCommands) {
     String formatted = formatter.format(sqlCommand);
     if (delimiter != null) {
       formatted += delimiter;
     }
     sqlStatementLogger.logStatement(sqlCommand, formatter);
     for (Exporter exporter : exporters) {
       try {
         exporter.export(formatted);
       } catch (Exception e) {
         if (haltOnError) {
           throw new HibernateException("Error during DDL export", e);
         }
         exceptions.add(e);
         LOG.unsuccessfulCreate(sqlCommand);
         LOG.error(e.getMessage());
       }
     }
   }
 }