Wiki source code of Full list of JDBC Provider Configuration Keys
Last modified by christoph_lechleitner@iteg_at on 2022-06-09 01.08:27
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
1.1 | 1 | = {{id name="FulllistofJDBCProviderConfigurationKeys-Introduction"/}}Introduction = |
| 2 | |||
| 3 | In most usecases, only the required configuration keys of DataSources will be used: {{code language="none"}}url{{/code}}, {{code language="none"}}username{{/code}}, {{code language="none"}}password{{/code}}, {{code language="none"}}validationQuery{{/code}}. | ||
| 4 | |||
| 5 | The following chapter provides a full list of supported key name patterns. | ||
| 6 | |||
| 7 | = {{id name="FulllistofJDBCProviderConfigurationKeys-Fullistoforg.clazzes.jdbc.providerdatasourceconfigurationkeys"/}}Ful list of org.clazzes.jdbc.provider datasource configuration keys = | ||
| 8 | |||
| |
2.1 | 9 | The JDBC-Provider supplies applications with Instances of [[org.apache.commons.dbcp.BasicDataSource>>url:https://commons.apache.org/proper/commons-dbcp/api-1.4/org/apache/commons/dbcp/BasicDataSource.html||shape="rect"]] from Apache's commons-dbcp project in Version 1.x, version 2.x of JDBC-Provider uses commons-dbcp2's [[org.apache.commons.dbcp2.BasicDataSource>>url:https://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp2/BasicDataSource.html||shape="rect"]], therefore most values go right into it's setters. |
| |
1.1 | 10 | |
| 11 | |=((( | ||
| 12 | (% class="tablesorter-header-inner" %) | ||
| 13 | ((( | ||
| 14 | Key | ||
| 15 | ))) | ||
| 16 | )))|=((( | ||
| 17 | (% class="tablesorter-header-inner" %) | ||
| 18 | ((( | ||
| 19 | Description | ||
| 20 | ))) | ||
| 21 | )))|=((( | ||
| |
2.1 | 22 | JDBC-Provider Version |
| |
1.1 | 23 | ))) |
| 24 | |((( | ||
| |
2.1 | 25 | {{code language="none"}} |
| |
1.1 | 26 | accessToUnderlyingConnectionAllowed |
| |
2.1 | 27 | {{/code}} |
| |
1.1 | 28 | )))|((( |
| 29 | Should not matter. Changes have no effect after pool initialization. | ||
| 30 | )))|((( | ||
| |
2.1 | 31 | 1.x and 2.x |
| |
1.1 | 32 | ))) |
| 33 | |((( | ||
| |
2.1 | 34 | {{code language="none"}} |
| |
1.1 | 35 | connectionInitSqls |
| |
2.1 | 36 | {{/code}} |
| |
1.1 | 37 | )))|((( |
| 38 | (% style="color: rgb(0,0,0);" %)List of SQL Statements to be executed when a physical connection is first created. Comma separated. Changes have no effect after pool initialization. | ||
| 39 | )))|((( | ||
| |
2.1 | 40 | 1.x and 2.x |
| |
1.1 | 41 | ))) |
| 42 | |((( | ||
| |
2.1 | 43 | {{code language="none"}} |
| |
1.1 | 44 | connectionProperties |
| |
2.1 | 45 | {{/code}} |
| |
1.1 | 46 | )))|((( |
| 47 | Connection properties. | ||
| 48 | )))|((( | ||
| |
2.1 | 49 | 1.x and 2.x |
| |
1.1 | 50 | ))) |
| 51 | |((( | ||
| |
2.1 | 52 | {{code language="none"}} |
| |
1.1 | 53 | defaultAutoCommit |
| |
2.1 | 54 | {{/code}} |
| |
1.1 | 55 | )))|((( |
| 56 | Default autocommit state. Should not matter for well-designed applications. Changes have no effect after pool initialization. | ||
| 57 | )))|((( | ||
| |
2.1 | 58 | 1.x and 2.x |
| |
1.1 | 59 | ))) |
| 60 | |((( | ||
| |
2.1 | 61 | {{code language="none"}} |
| |
1.1 | 62 | defaultCatalog |
| |
2.1 | 63 | {{/code}} |
| |
1.1 | 64 | )))|((( |
| 65 | Default catalog name. Changes have no effect after pool initialization. | ||
| 66 | )))|((( | ||
| |
2.1 | 67 | 1.x and 2.x |
| |
1.1 | 68 | ))) |
| 69 | |((( | ||
| |
2.1 | 70 | {{code language="none"}} |
| |
1.1 | 71 | defaultReadOnly |
| |
2.1 | 72 | {{/code}} |
| |
1.1 | 73 | )))|((( |
| 74 | Changes have no effect after pool initialization. | ||
| 75 | )))|((( | ||
| |
2.1 | 76 | 1.x and 2.x |
| |
1.1 | 77 | ))) |
| 78 | |((( | ||
| |
2.1 | 79 | {{code language="none"}} |
| |
1.1 | 80 | defaultTransactionIsolation |
| |
2.1 | 81 | {{/code}} |
| |
1.1 | 82 | )))|((( |
| 83 | Changes have no effect after pool initialization. | ||
| 84 | )))|((( | ||
| |
2.1 | 85 | 1.x and 2.x |
| |
1.1 | 86 | ))) |
| 87 | |((( | ||
| 88 | {{code language="none"}} | ||
| |
2.1 | 89 | driverClassName |
| |
1.1 | 90 | {{/code}} |
| 91 | )))|((( | ||
| 92 | Optional for common database backends. Name of the database driver to use. | ||
| 93 | |||
| 94 | For MySQL, MSSQL, PostgreSQL and Oracle the driver class name is automatically deduced from the JDBC URL. | ||
| 95 | |||
| 96 | The class is resolved using the(% style="line-height: 1.4285715;" %) class loader of the jdbc-provider bundle. | ||
| 97 | This allows for putting JDBC driver on the boot classloader of the OSGi container or creating fragment bundles, which supply JDBC drivers to the jdbc-provider bundle. | ||
| 98 | )))|((( | ||
| |
2.1 | 99 | 1.x and 2.x |
| |
1.1 | 100 | ))) |
| 101 | |((( | ||
| |
2.1 | 102 | {{code language="none"}} |
| |
1.1 | 103 | initialSize |
| |
2.1 | 104 | {{/code}} |
| |
1.1 | 105 | )))|((( |
| 106 | Initial size of the pool. Changes have no effect after pool initialization. | ||
| 107 | )))|((( | ||
| |
2.1 | 108 | 1.x and 2.x |
| |
1.1 | 109 | ))) |
| 110 | |((( | ||
| |
2.1 | 111 | {{code language="none"}} |
| |
1.1 | 112 | maxActive |
| |
2.1 | 113 | {{/code}} |
| |
1.1 | 114 | )))|((( |
| 115 | (% style="color: rgb(0,0,0);" %)Maximum number of active connections that can be allocated at the same time. Use a negative value for no limit. | ||
| 116 | )))|((( | ||
| |
2.1 | 117 | 1.x |
| |
1.1 | 118 | ))) |
| 119 | |((( | ||
| |
2.1 | 120 | {{code language="none"}} |
| 121 | maxTotal | ||
| 122 | {{/code}} | ||
| 123 | )))|((( | ||
| 124 | (% style="color: rgb(71,71,71);" %)Maximum number of active connections that can be allocated at the same time. | ||
| 125 | )))|((( | ||
| 126 | 2.x, if this value is not set, the value of {{code language="none"}}maxActive{{/code}} will be taken for compatibility reasons. | ||
| 127 | ))) | ||
| 128 | |((( | ||
| 129 | {{code language="none"}} | ||
| 130 | fastFailValidation | ||
| 131 | {{/code}} | ||
| 132 | )))|((( | ||
| 133 | Whether conenctions with previous SQL states indicating a server dconnect are immediately evicted. | ||
| 134 | )))|((( | ||
| 135 | 2.x | ||
| 136 | ))) | ||
| 137 | |((( | ||
| 138 | {{code language="none"}} | ||
| |
3.1 | 139 | maxConnLifetimeMillis |
| 140 | {{/code}} | ||
| 141 | )))|((( | ||
| 142 | Maximal connection lifetime in milliseconds | ||
| 143 | )))|((( | ||
| 144 | 2.x | ||
| 145 | ))) | ||
| 146 | |((( | ||
| 147 | {{code language="none"}} | ||
| |
1.1 | 148 | maxIdle |
| |
2.1 | 149 | {{/code}} |
| |
1.1 | 150 | )))|((( |
| 151 | (% style="color: rgb(0,0,0);" %)Maximum number of connections that can remain idle in the pool. | ||
| 152 | )))|((( | ||
| |
2.1 | 153 | 1.x and 2.x |
| |
1.1 | 154 | ))) |
| 155 | |((( | ||
| |
2.1 | 156 | {{code language="none"}} |
| |
1.1 | 157 | maxOpenPreparedStatement |
| |
2.1 | 158 | {{/code}} |
| |
1.1 | 159 | )))|((( |
| 160 | Maximum number of PreparedStatements to pool. (% style="color: rgb(0,0,0);" %)Use a negative value for no limit. (%%)Changes have no effect after pool initialization. | ||
| 161 | )))|((( | ||
| |
2.1 | 162 | 1.x and 2.x |
| |
1.1 | 163 | ))) |
| 164 | |((( | ||
| |
2.1 | 165 | {{code language="none"}} |
| |
1.1 | 166 | maxWait |
| |
2.1 | 167 | {{/code}} |
| |
1.1 | 168 | )))|((( |
| |
2.1 | 169 | (% style="color: rgb(0, 0, 0); color: rgb(71, 71, 71)" %)The maximum number of milliseconds that the pool will wait for a connection to be returned before throwing an exception. (% style="color: rgb(0,0,0);" %)Use a negative value for no limit. |
| |
1.1 | 170 | )))|((( |
| |
2.1 | 171 | 1.x |
| |
1.1 | 172 | ))) |
| 173 | |((( | ||
| |
2.1 | 174 | {{code language="none"}} |
| 175 | maxWaitMillis | ||
| 176 | {{/code}} | ||
| 177 | )))|((( | ||
| 178 | The same value as {{code language="none"}}maxWait{{/code}}, but for Version 2.x | ||
| 179 | )))|((( | ||
| 180 | 2.x, if this value is not set, the value of {{code language="none"}}maxWait{{/code}} will be taken for compatibility reasons. | ||
| 181 | ))) | ||
| 182 | |((( | ||
| 183 | {{code language="none"}} | ||
| |
1.1 | 184 | minEvictableIdleTimeMillis |
| |
2.1 | 185 | {{/code}} |
| |
1.1 | 186 | )))|((( |
| 187 | (% style="color: rgb(0,0,0);" %)Minimum amount of time an object may sit idle in the pool. | ||
| 188 | )))|((( | ||
| |
2.1 | 189 | 1.x and 2.x |
| |
1.1 | 190 | ))) |
| 191 | |((( | ||
| |
2.1 | 192 | {{code language="none"}} |
| |
1.1 | 193 | minIdle |
| |
2.1 | 194 | {{/code}} |
| |
1.1 | 195 | )))|((( |
| 196 | (% style="color: rgb(0,0,0);" %)Minimum number of idle connections in the pool. | ||
| 197 | )))|((( | ||
| |
2.1 | 198 | 1.x and 2.x |
| |
1.1 | 199 | ))) |
| 200 | |((( | ||
| 201 | {{code language="none"}} | ||
| |
2.1 | 202 | password |
| |
1.1 | 203 | {{/code}} |
| 204 | )))|((( | ||
| 205 | Required. JDBC Password. Changes have no effect after pool initialization. | ||
| 206 | )))|((( | ||
| |
2.1 | 207 | 1.x and 2.x |
| |
1.1 | 208 | ))) |
| 209 | |((( | ||
| |
2.1 | 210 | {{code language="none"}} |
| |
1.1 | 211 | poolPreparedStatements |
| |
2.1 | 212 | {{/code}} |
| |
1.1 | 213 | )))|((( |
| 214 | (% style="color: rgb(0,0,0);" %)Whether to pool statements or not. Changes have no effect after pool initialization. | ||
| 215 | )))|((( | ||
| |
2.1 | 216 | 1.x and 2.x |
| |
1.1 | 217 | ))) |
| 218 | |((( | ||
| |
2.1 | 219 | {{code language="none"}} |
| |
1.1 | 220 | removeAbandoned |
| |
2.1 | 221 | {{/code}} |
| |
1.1 | 222 | )))|((( |
| |
2.1 | 223 | Whether abandoned (blocking) queries will be removed form the pool. This is a last-resort option, which has the potential to also evict long-running "ordinary" query. |
| |
1.1 | 224 | )))|((( |
| |
2.1 | 225 | 1.x |
| |
1.1 | 226 | ))) |
| 227 | |((( | ||
| |
2.1 | 228 | ##(% style="color: rgb(53,56,51);" %)removeAbandonedOnBorrow(%%)## |
| 229 | )))|((( | ||
| 230 | Whether abandoned (blocking) queries will be removed form the pool on connection borrow. | ||
| 231 | )))|((( | ||
| 232 | 2.x | ||
| 233 | ))) | ||
| 234 | |((( | ||
| 235 | ##(% style="color: rgb(53,56,51);" %)removeAbandonedOnMaintenance(%%)## | ||
| 236 | )))|((( | ||
| 237 | Whether abandoned (blocking) queries will be removed form the pool during pool maintenance. | ||
| 238 | )))|((( | ||
| 239 | 2.x | ||
| 240 | ))) | ||
| 241 | |((( | ||
| 242 | {{code language="none"}} | ||
| |
1.1 | 243 | removeAbandonedTimeout |
| |
2.1 | 244 | {{/code}} |
| |
1.1 | 245 | )))|((( |
| |
2.1 | 246 | The timeout in second after which a long-running query is considered as abandoned. |
| |
1.1 | 247 | )))|((( |
| |
2.1 | 248 | 1.x and 2.x |
| |
1.1 | 249 | ))) |
| 250 | |((( | ||
| |
2.1 | 251 | {{code language="none"}} |
| |
1.1 | 252 | testOnBorrow |
| |
2.1 | 253 | {{/code}} |
| |
1.1 | 254 | )))|((( |
| 255 | Wether the validation query shall be executed before each "borrow" from the pool. | ||
| 256 | )))|((( | ||
| |
2.1 | 257 | 1.x and 2.x |
| |
1.1 | 258 | ))) |
| 259 | |((( | ||
| |
2.1 | 260 | {{code language="none"}} |
| |
1.1 | 261 | testOnReturn |
| |
2.1 | 262 | {{/code}} |
| |
1.1 | 263 | )))|((( |
| 264 | Wether the validation query shall be executed when a connection is returned to the pool. | ||
| 265 | )))|((( | ||
| |
2.1 | 266 | 1.x and 2.x |
| |
1.1 | 267 | ))) |
| 268 | |((( | ||
| |
2.1 | 269 | {{code language="none"}} |
| 270 | testOnCreate | ||
| 271 | {{/code}} | ||
| 272 | )))|((( | ||
| 273 | Whether the validation query will be run immediately after the conenction creation. | ||
| 274 | )))|((( | ||
| 275 | 2.x | ||
| 276 | ))) | ||
| 277 | |((( | ||
| 278 | {{code language="none"}} | ||
| |
1.1 | 279 | testWhileIdle |
| |
2.1 | 280 | {{/code}} |
| |
1.1 | 281 | )))|((( |
| 282 | Wether the validation query shall be executed regularily to keep the connection alive. | ||
| 283 | )))|((( | ||
| |
2.1 | 284 | 1.x and 2.x |
| |
1.1 | 285 | ))) |
| 286 | |((( | ||
| |
2.1 | 287 | {{code language="none"}} |
| |
1.1 | 288 | timeBetweenEvictionRunsMillis |
| |
2.1 | 289 | {{/code}} |
| |
1.1 | 290 | )))|((( |
| |
2.1 | 291 | The time in milliseconds between two runs of the IDLE evictor Runnable. |
| |
1.1 | 292 | )))|((( |
| |
2.1 | 293 | 1.x and 2.x |
| |
1.1 | 294 | ))) |
| 295 | |((( | ||
| 296 | {{code language="none"}} | ||
| |
2.1 | 297 | url |
| |
1.1 | 298 | {{/code}} |
| 299 | )))|((( | ||
| 300 | Required. JDBC URL. JDBC URL examples for common databases can be found in our [[doc:KH.Database Tips.JDBC Snippets.WebHome]]. Changes have no effect after pool initialization. | ||
| 301 | )))|((( | ||
| |
2.1 | 302 | 1.x and 2.x |
| |
1.1 | 303 | ))) |
| 304 | |((( | ||
| 305 | {{code language="none"}} | ||
| |
2.1 | 306 | username |
| |
1.1 | 307 | {{/code}} |
| 308 | )))|((( | ||
| 309 | Required. JDBC User. Changes have no effect after pool initialization. | ||
| 310 | )))|((( | ||
| |
2.1 | 311 | 1.x and 2.x |
| |
1.1 | 312 | ))) |
| 313 | |((( | ||
| 314 | {{code language="none"}} | ||
| |
2.1 | 315 | validationQuery |
| |
1.1 | 316 | {{/code}} |
| 317 | )))|((( | ||
| 318 | Required. Validation query, executed to ensure the application receives a valid connection. | ||
| 319 | Common validation queries can be found in our [[doc:KH.Database Tips.JDBC Snippets.WebHome]]. | ||
| 320 | )))|((( | ||
| |
2.1 | 321 | 1.x and 2.x |
| |
1.1 | 322 | ))) |
| 323 | |||
| |
4.1 | 324 | For more supported key patterns take a look at the JavaDoc of the [[org.clazzes.util.jdbc.provider.JdbcProvider>>url:http://svn.clazzes.org/svn/util/trunk/jdbc-provider/src/main/java/org/clazzes/util/jdbc/provider/JdbcProvider.java||shape="rect"]] class, i.e. [[JdbcProvider.html>>url:https://maven-snapshots.clazzes.org/javadoc/org.clazzes.util/jdbc-provider/apidocs/org/clazzes/util/jdbc/provider/JdbcProvider.html||shape="rect"]]. |
| |
1.1 | 325 | |
| 326 | Typical JDBC URLs and validation queries can be found in our [[doc:KH.Database Tips.JDBC Snippets.WebHome]]. |