资源简介
这是最新的 linux 系统上面使用的 mysql 驱动类文件
代码片段和文件信息
/*
Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
The MySQL Connector/J is licensed under the terms of the GPLv2
like most MySQL Connectors.
There are special exceptions to the terms and conditions of the GPLv2 as it is applied to
this software see the FLOSS License Exception
.
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation; version 2
of the License.
This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this
program; if not write to the Free Software Foundation Inc. 51 Franklin St Fifth
Floor Boston MA 02110-1301 USA
*/
package com.mysql.jdbc;
import java.lang.ref.Reference;
import com.mysql.jdbc.NonRegisteringDriver.ConnectionPhantomReference;
public class AbandonedConnectionCleanupThread extends Thread {
private static boolean running = true;
private static Thread threadRef = null;
public AbandonedConnectionCleanupThread() {
super(“Abandoned connection cleanup thread“);
}
public void run() {
threadRef = this;
threadRef.setContextClassLoader(null);
while (running) {
try {
Reference extends ConnectionImpl> ref = NonRegisteringDriver.refQueue.remove(100);
if (ref != null) {
try {
((ConnectionPhantomReference) ref).cleanup();
} finally {
NonRegisteringDriver.connectionPhantomRefs.remove(ref);
}
}
} catch (Exception ex) {
// no where to really log this if we‘re static
}
}
}
public static void shutdown() throws InterruptedException {
running = false;
if (threadRef != null) {
threadRef.interrupt();
threadRef.join();
threadRef = null;
}
}
}
相关资源
- struts2 mysql实现简单学生成绩管理代码
- mysql-connector-odbc-5.2.6-winx64.msi
- 本文主要介绍NodeJS+Express+Mysql实现用户
- Struts框架 用户登录系统 连接MYsql数据
- 微博--登录功能实现
- lazarus-mysql5.7.zip
- LinuxCentOS7.3系统从入门到精通完整版
- arm环境下执行的sqlcipher
- spring+springmvc+mybatis完善的增删改查,
- Haproxy+Keeplived做Mysql和web负载高可用
- MySQL完全教程.pdf
- mysql-connector-net-6.9.9
- MySQL5.1官方中文参考手册
- MySQL与MariaDB学习指南.pdf
- 新闻发布系统MySQL.rar
- MySQL5.7安装与配置详细教程
- MySQL Data(世界上78700多个城市地区(
- Linux下Oracle 11g数据库安装
- MySQL-5.5以上JDBC驱动包
- 基于springboot+layui+shiro+mysql编写的医院
- DBImport破解版sqlitetomysqltoOracle.rar
- 2016年版-汽车之家车型数据库Mysql
- JDBC连接MySQL驱动
- 农历数据库1970-2100年mysql
- oracle linux7.2 安装oracle 11.2.0.4全过程图
- 掘金小册MySQL是怎样运行的:从根儿上
- MySQL 数据库系统设计实现与管理第六
- 微信小程序后台Springboot+Mysql
- mysqlclient-1.3.13-cp36-cp36m-win_amd64.whl
- mysql驱动适用于mysql5.7版本
评论
共有 条评论