惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Vulnerabilities – Threatpost
U
Unit 42
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
F
Full Disclosure
月光博客
月光博客
Engineering at Meta
Engineering at Meta
博客园_首页
The Register - Security
The Register - Security
G
Google Developers Blog
The Cloudflare Blog
博客园 - Franky
K
Kaspersky official blog
A
Arctic Wolf
Scott Helme
Scott Helme
C
Cisco Blogs
Hugging Face - Blog
Hugging Face - Blog
C
Check Point Blog
NISL@THU
NISL@THU
AI
AI
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Vercel News
Vercel News
T
Tor Project blog
P
Privacy International News Feed
D
Docker
I
Intezer
L
LangChain Blog
P
Proofpoint News Feed
Security Latest
Security Latest
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
博客园 - 聂微东
AWS News Blog
AWS News Blog
Martin Fowler
Martin Fowler
P
Privacy & Cybersecurity Law Blog
V
V2EX
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
The Hacker News
The Hacker News
T
Tenable Blog
Blog — PlanetScale
Blog — PlanetScale
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog

博客园 - 家中慢步

AKShare 高频请求东财数据接口的异常问题及解决方案 httpclient发送request请求时设置header和timeout redmine 安装roadmap 插件 centos 下自动备份redmine 数据 centos 5.6 安装redmine 步骤 解决mysql 写入中文读出乱码的问题 SVN的Redmine集成插件 Quartz.net Tutorial Lesson 2 Redmine 导入AD用户 RedMine 邮件通知配置 teamlab与redmine试用对比报告 Redmine集成LDAP认证 Redmine 初体验 jqgrid 属性说明 [原创]sql server inner join 效率测试 为sql server客户端连接添加别名 [转载]sql server T-SQL 区分字符串大小写 的两种方法 [转载]sql server 常用存储过程 Quartz.net Tutorial Lesson 1
quartz 2.2.1 jdbc 连接池参数配置
家中慢步 · 2015-11-12 · via 博客园 - 家中慢步
   /** The JDBC database driver. */指定连接驱动
   public static final String DB_DRIVER = "driver";

     /** The JDBC database URL. */  连接字符串
    public static final String DB_URL = "URL";


    /** The database user name. */ 用户名
    public static final String DB_USER = "user";

    /** The database user password. */ 密码
    public static final String DB_PASSWORD = "password";

    /** The maximum number of database connections to have in the pool.  Default is 10. */ 连接池最大连接数
    public static final String DB_MAX_CONNECTIONS = "maxConnections";

    /** 
     * The maximum number of prepared statements that will be cached per connection in the pool.
     * Depending upon your JDBC Driver this may significantly help performance, or may slightly 
     * hinder performance.   
     * Default is 120, as Quartz uses over 100 unique statements. 0 disables the feature. 
     */     每个链接最多缓存多少个预编译语句
    public static final String DB_MAX_CACHED_STATEMENTS_PER_CONNECTION = "maxCachedStatementsPerConnection";

    /** 
     * The database sql query to execute every time a connection is returned 
     * to the pool to ensure that it is still valid. 
     */  验证连接是否可用的查询语句
    public static final String DB_VALIDATION_QUERY = "validationQuery";

    /** 
     * The number of seconds between tests of idle connections - only enabled
     * if the validation query property is set.  Default is 50 seconds. 
     */   多久验证空闲连接
    public static final String DB_IDLE_VALIDATION_SECONDS = "idleConnectionValidationSeconds";

    /** 
     * Whether the database sql query to validate connections should be executed every time 
     * a connection is retrieved from the pool to ensure that it is still valid.  If false,
     * then validation will occur on check-in.  Default is false. 
     */  是否每次从池中取连接时,验证连接可用性
    public static final String DB_VALIDATE_ON_CHECKOUT = "validateOnCheckout";
    
    /** Discard connections after they have been idle this many seconds.  0 disables the feature. Default is 0.*/   空闲连接超过多少秒丢弃
    private static final String DB_DISCARD_IDLE_CONNECTIONS_SECONDS = "discardIdleConnectionsSeconds"; 

    /** Default maximum number of database connections in the pool. */  最大连接数
    public static final int DEFAULT_DB_MAX_CONNECTIONS = 10;

    /** Default maximum number of database connections in the pool. */   默认每个链接缓存120个预编译语句
    public static final int DEFAULT_DB_MAX_CACHED_STATEMENTS_PER_CONNECTION = 120;

quartz连接池配置对C3PO连接池配置进行了一些封装, 留作记录。

mysql 断开连接可以通过设置 validateOnCheckout=true + validationQuery

或者设置discardIdleConnectionsSeconds 少于8小时解决。