1 / 7
文档名称:

一个连接池的例子(来自JIVE)(2).txt

格式:txt   页数:7
下载后只包含 1 个 TXT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

一个连接池的例子(来自JIVE)(2).txt

上传人:管理资源吧 2011/9/11 文件大小:0 KB

下载得到文件列表

一个连接池的例子(来自JIVE)(2).txt

文档介绍

文档介绍:作者:sonymusic
email: sonymusic@
日期:2001-5-17 11:33:47
//文件:
/**
* Housekeeping thread. Runs in the background with low CPU overhead.
* Connections are checked for warnings and closure and are periodically
* restarted.
* This thread is a catchall for corrupted
* connections and prevents the buildup of open cursors. (Open cursors
* result when the application fails to close a Statement).
* This method acts as fault tolerance for bad connection/statement programming.
*/
public void run() {
boolean forever = true;
Statement stmt=null;
String currCatalog=null;
while(forever) {
// Make sure the log file is the one this instance opened
// If not, clean it up!
try {
BufferedReader in = new BufferedReader(new
FileReader(logFileString + "pid"));
String curr_pid = ();
if((pid)) {
//("They match = " + curr_pid);
}
else {
//("No match = " + curr_pid);
();
// Close all connections silently - they are definitely dead.
for(int i=0; i < currConnections; i++) {
try {
connPool[i].close();
}
catch (SQLException e1) {} // ignore
}
// Returning from the run() method kills the thread
return;
}
();
}
catch (IOException e1) {
("Can't read the file for pid info: " +
logFileString + "pid");
}
// Get any Warning

最近更新

2025年广西质量工程职业技术学院单招职业适应.. 41页

2025年德州职业技术学院单招职业适应性考试模.. 42页

2025年怀化职业技术学院单招综合素质考试题库.. 40页

2025年成都外国语学院单招职业技能测试模拟测.. 40页

2025年成都艺术职业大学单招职业倾向性测试题.. 38页

2025年承德应用技术职业学院单招职业适应性测.. 40页

2025年晋中师范高等专科学校单招综合素质考试.. 40页

2025年曲靖职业技术学院单招职业倾向性考试模.. 39页

2025年枣庄科技职业学院单招综合素质考试题库.. 40页

2025年武汉信息传播职业技术学院单招职业倾向.. 41页

2025年汕头职业技术学院单招综合素质考试模拟.. 37页

2025年江海职业技术学院单招职业适应性测试题.. 43页

2025年江苏城乡建设职业学院单招职业倾向性考.. 43页

2025年江苏护理职业学院单招职业技能测试模拟.. 39页

2025年江西农业工程职业学院单招职业适应性考.. 40页

2025年江西工业职业技术学院单招职业倾向性测.. 41页

2025年江西水利职业学院单招职业适应性考试模.. 40页

2025年江西省九江市单招职业倾向性考试模拟测.. 42页

2025年沧州医学高等专科学校单招职业倾向性考.. 40页

2025年河北劳动关系职业学院单招职业倾向性测.. 40页

2025年河北工业职业技术大学单招职业适应性测.. 39页

2025年河北省保定市单招职业适应性考试模拟测.. 40页

2025年河北科技工程职业技术大学单招综合素质.. 41页

2025年广州卫生职业技术学院单招职业技能测试.. 64页

美团代运营业务委托合同 6页

九年级家长会课件PPT下载(初三2班) 25页

山东科技版小学英语五年级下册词汇表带音标 4页

年产3000万片硝苯地平缓释片车间设计 40页

DB61∕T 926-2014 火灾高危单位消防安全管理与.. 45页

AQ 7011-2018《高温熔融金属吊运安全规程》 11页