package com.mandi.dao.common; import java.sql.Connection; import java.sql.SQLException; import org.apache.log4j.Logger; import org.hibernate.jdbc.Work; /** * @author mengly * @version 创建时间:2015年9月15日 上午10:03:35 * 类说明 */ public class Workcheckconnection implements Work { private Logger log=Logger.getLogger(Workcheckconnection.class); private boolean flg=false; @Override public void execute(Connection arg0) throws SQLException { try{ if(arg0==null) { flg=false; }else{ flg=false; } }catch (Exception e) { flg=false; log.info("work check connection error"); } } public boolean isFlg() { return flg; } public void setFlg(boolean flg) { this.flg = flg; } }