You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aggregation-platform/src/com/platform/service/thread/ThreadGainOracleConnect.java

56 lines
1.2 KiB

package com.platform.service.thread;
import com.base.Custom4exception;
import com.base.CustomException;
import com.platform.form.oracleForm;
import com.platform.service.IOracleExtractService;
/** 测试是否能获得oracle连接
* @author chen
*
*/
public class ThreadGainOracleConnect extends Thread {
private boolean isConnect = false;
private boolean isExcept = false;
private IOracleExtractService OracleExtract;
private oracleForm form;
/** 测试是否能获得oracle连接
* @param form
* @param OracleExtract
*/
public ThreadGainOracleConnect(oracleForm form, IOracleExtractService OracleExtract) {
this.form = form;
this.OracleExtract= OracleExtract;
}
@Override
public void run() {
try {
this.isConnect = OracleExtract.isConnectTotalOracle(form.getTarget());
} catch (Exception e) {
isExcept = true;
new CustomException(Custom4exception.connect_Oracle_Except,e,form,OracleExtract);
}
}
/**
* @return the isConnect true:能连接
*/
public boolean isConnect() {
return isConnect;
}
/**
* @return the isExcept
*/
public boolean isExcept() {
return isExcept;
}
}