?????????????????д??÷??????????????????飬???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????Щ????????????????????????????????????????????????????????????????漲??????????????????????????????????????????е???÷?????????????????????????????????????????????????????????????????????????????????Connection.close()???????????????漲????????????????????????????????????

??????????????????????????????????????????

????????????????????????????????????????

int executeSQL(String sql) throws SQLException
{
Connection conn = getConnection(); //????????????????????
PreparedStatement ps = null;
int res = 0;
try{
ps = conn.prepareStatement(sql);
res = ps.executeUpdate();
}finally{
try{
ps.close();
}catch(Exception e){}
try{
conn.close();//
}catch(Exception e){}
}
return res;
}

????????????????????????????????????????????close??????????????????????????????????????????????????conn.close()?????Щ???????????????

??????????????????????е???????????ж???????????????????????????????????close??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

??????????????????????????????????????ν?????????????????

?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????java.sql.Connection?????????????????????????????????????????????????????????????

????????????????????????????????Connection.close??????????????????μ?????

???????????????????close??????????????????????????????????????Windows????????????????Hook API?????????Windows API???????JAVA????????????????????JAVA???????Proxy??????InvocationHandler????????????java.lang.reflect???С?????????????SUN?????????????????????????????

public interface InvocationHandler
InvocationHandler is the interface implemented by the invocation handler of a proxy instance.
Each proxy instance has an associated invocation handler.
When a method is invoked on a proxy instance??
the method invocation is encoded and dispatched to the invoke method of its invocation handler.

????SUN??API????й???Proxy????????????????г???????????????InvocationHandler?????????????????????????Proxy?????????????Invocationhanlder??invoke????????JAVA???????????????????????????????????????????????????????Ч???????java.sql.Connection?????????????????????????ν??close???????·??