提交 | 用户 | 时间
|
58d006
|
1 |
package com.mandi.dao.common; |
A |
2 |
|
|
3 |
import java.sql.Connection; |
|
4 |
import java.sql.SQLException; |
|
5 |
|
|
6 |
import org.apache.log4j.Logger; |
|
7 |
import org.hibernate.jdbc.Work; |
|
8 |
|
|
9 |
/** |
|
10 |
* @author mengly |
|
11 |
* @version 创建时间:2015年9月15日 上午10:03:35 |
|
12 |
* 类说明 |
|
13 |
*/ |
|
14 |
|
|
15 |
public class Workcheckconnection implements Work { |
|
16 |
private Logger log=Logger.getLogger(Workcheckconnection.class); |
|
17 |
private boolean flg=false; |
|
18 |
@Override |
|
19 |
public void execute(Connection arg0) throws SQLException { |
|
20 |
try{ |
|
21 |
|
|
22 |
if(arg0==null) |
|
23 |
{ |
|
24 |
flg=false; |
|
25 |
}else{ |
|
26 |
flg=false; |
|
27 |
} |
|
28 |
}catch (Exception e) { |
|
29 |
flg=false; |
|
30 |
log.info("work check connection error"); |
|
31 |
} |
|
32 |
} |
|
33 |
public boolean isFlg() { |
|
34 |
return flg; |
|
35 |
} |
|
36 |
public void setFlg(boolean flg) { |
|
37 |
this.flg = flg; |
|
38 |
} |
|
39 |
|
|
40 |
|
|
41 |
} |