code: public boolean execute(Map<String, String> params, String query) {
          final AtomicBoolean result = new AtomicBoolean(false);
          Tuple2<DataSource, Connection> conn = null;
          try {
              conn = getConnection();
              NamedParameterJdbcTemplate jdbcTemplate = new NamedParameterJdbcTemplate(conn._1());
              jdbcTemplate.execute(query, params, new PreparedStatementCallback<Void>() {
                  @Override
                  public Void doInPreparedStatement(PreparedStatement ps) {
                      try {
                          result.set(ps.execute());
                      } catch(SQLException e) {
                          result.set(false);
                      }
                      return null;
                  }
              });
          } catch (Exception ex) {
              Logger.getLogger(MysqlAccessor.class.getName()).log(Level.SEVERE, null, ex);
              result.set(false);
          } finally {
              returnConnection(conn);
          }
          return result.get();
      }
docs: Suitable for CRUD operations where no result set is expected.
  @param params
  @param query
  @return