日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

quartz 2.2.1 jdbc 连接池参数配置

發布時間:2023/12/19 编程问答 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 quartz 2.2.1 jdbc 连接池参数配置 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
/** 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小時解決。

轉載于:https://www.cnblogs.com/snowlove67/p/4958406.html

總結

以上是生活随笔為你收集整理的quartz 2.2.1 jdbc 连接池参数配置的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。