???JAVA?е????????????????????
???????????? ???????[ 2013/8/30 9:51:14 ] ????????
?????????????????д??÷??????????????????飬???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????Щ????????????????????????????????????????????????????????????????漲??????????????????????????????????????????е???÷?????????????????????????????????????????????????????????????????????????????????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???????·??
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11