Skip to content

Commit

Permalink
format & result.close
Browse files Browse the repository at this point in the history
  • Loading branch information
agapple committed Jun 29, 2016
1 parent 615ec43 commit 575f9cc
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
*/
public class MailAlarmService extends AbstractAlarmService {

private static final String TITLE = "alarm_from_yugong";
private JavaMailSender mailSender;
private String emailUsername;
private String emailPassword;
private String emailHost;
private int stmpPort = 465;
private boolean sslSupport = true;
private static final String TITLE = "alarm_from_yugong";
private JavaMailSender mailSender;
private String emailUsername;
private String emailPassword;
private String emailHost;
private int stmpPort = 465;
private boolean sslSupport = true;

@Override
public void start() {
Expand Down
42 changes: 21 additions & 21 deletions src/main/java/com/taobao/yugong/controller/YuGongController.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
package com.taobao.yugong.controller;

import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Properties;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

import javax.sql.DataSource;

import org.apache.commons.configuration.Configuration;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.MDC;
import org.springframework.jdbc.core.JdbcTemplate;

import com.google.common.collect.Lists;
import com.taobao.yugong.applier.AllRecordApplier;
import com.taobao.yugong.applier.CheckRecordApplier;
Expand Down Expand Up @@ -42,27 +63,6 @@
import com.taobao.yugong.positioner.RecordPositioner;
import com.taobao.yugong.translator.DataTranslator;

import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Properties;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

import javax.sql.DataSource;

import org.apache.commons.configuration.Configuration;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.MDC;
import org.springframework.jdbc.core.JdbcTemplate;

/**
* 整个迁移流程调度控制
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ public Object doInPreparedStatement(PreparedStatement ps) throws SQLException, D
result.add(record);
}

rs.close();
return result;
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ public Object doInStatement(Statement stmt) throws SQLException, DataAccessExcep
}

setStatus(ExtractStatus.TABLE_END);
rs.close();
return null;
}
});
Expand Down

0 comments on commit 575f9cc

Please sign in to comment.