Wiki source code of Full list of JDBC Provider Configuration Keys
Version 1.1 by christoph_lechleitner@iteg_at on 2013-07-09 04.05:41
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 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 | |||
| 9 | The JDBC-Provider supplies applications with Instances of [[org.apache.commons.dbcp.BasicDataSource>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html||shape="rect"]] from Apache's commons-dbcp project, therefore most values go right into it's setters. | ||
| 10 | |||
| 11 | |=((( | ||
| 12 | (% class="tablesorter-header-inner" %) | ||
| 13 | ((( | ||
| 14 | Key | ||
| 15 | ))) | ||
| 16 | )))|=((( | ||
| 17 | (% class="tablesorter-header-inner" %) | ||
| 18 | ((( | ||
| 19 | Description | ||
| 20 | ))) | ||
| 21 | )))|=((( | ||
| 22 | Ac. BasicDataSource setter | ||
| 23 | ))) | ||
| 24 | |((( | ||
| 25 | accessToUnderlyingConnectionAllowed | ||
| 26 | )))|((( | ||
| 27 | Should not matter. Changes have no effect after pool initialization. | ||
| 28 | )))|((( | ||
| 29 | [[setAccessToUnderlyingConnectionAllowed(boolean)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setAccessToUnderlyingConnectionAllowed(boolean)||shape="rect"]] | ||
| 30 | ))) | ||
| 31 | |((( | ||
| 32 | connectionInitSqls | ||
| 33 | )))|((( | ||
| 34 | (% 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. | ||
| 35 | )))|((( | ||
| 36 | [[setConnectionInitSqls(Collection)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setConnectionInitSqls(java.util.Collection)||shape="rect"]] | ||
| 37 | ))) | ||
| 38 | |((( | ||
| 39 | connectionProperties | ||
| 40 | )))|((( | ||
| 41 | Connection properties. | ||
| 42 | )))|((( | ||
| 43 | [[setConnectionProperties(String)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setConnectionProperties(java.lang.String)||shape="rect"]] | ||
| 44 | ))) | ||
| 45 | |((( | ||
| 46 | defaultAutoCommit | ||
| 47 | )))|((( | ||
| 48 | Default autocommit state. Should not matter for well-designed applications. Changes have no effect after pool initialization. | ||
| 49 | )))|((( | ||
| 50 | [[setDefaultAutoCommit(boolean)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setDefaultAutoCommit(boolean)||shape="rect"]] | ||
| 51 | ))) | ||
| 52 | |((( | ||
| 53 | defaultCatalog | ||
| 54 | )))|((( | ||
| 55 | Default catalog name. Changes have no effect after pool initialization. | ||
| 56 | )))|((( | ||
| 57 | [[setDefaultCatalog(String)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setDefaultCatalog(java.lang.String)||shape="rect"]] | ||
| 58 | ))) | ||
| 59 | |((( | ||
| 60 | defaultReadOnly | ||
| 61 | )))|((( | ||
| 62 | Changes have no effect after pool initialization. | ||
| 63 | )))|((( | ||
| 64 | [[setDefaultReadOnly(boolean)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setDefaultReadOnly(boolean)||shape="rect"]] | ||
| 65 | ))) | ||
| 66 | |((( | ||
| 67 | defaultTransactionIsolation | ||
| 68 | )))|((( | ||
| 69 | Changes have no effect after pool initialization. | ||
| 70 | )))|((( | ||
| 71 | [[setDefaultTransactionIsolation(int)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setDefaultTransactionIsolation(int)||shape="rect"]] | ||
| 72 | ))) | ||
| 73 | |((( | ||
| 74 | {{code language="none"}} | ||
| 75 | datasource.<datasourcename>.driverClassName | ||
| 76 | {{/code}} | ||
| 77 | )))|((( | ||
| 78 | Optional for common database backends. Name of the database driver to use. | ||
| 79 | |||
| 80 | For MySQL, MSSQL, PostgreSQL and Oracle the driver class name is automatically deduced from the JDBC URL. | ||
| 81 | |||
| 82 | The class is resolved using the(% style="line-height: 1.4285715;" %) class loader of the jdbc-provider bundle. | ||
| 83 | 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. | ||
| 84 | )))|((( | ||
| 85 | [[setDriverClassName(String)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setDriverClassName(java.lang.String)||shape="rect"]] | ||
| 86 | ))) | ||
| 87 | |((( | ||
| 88 | initialSize | ||
| 89 | )))|((( | ||
| 90 | Initial size of the pool. Changes have no effect after pool initialization. | ||
| 91 | )))|((( | ||
| 92 | [[setInitialSize(int)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setInitialSize(int)||shape="rect"]] | ||
| 93 | ))) | ||
| 94 | |((( | ||
| 95 | maxActive | ||
| 96 | )))|((( | ||
| 97 | (% 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. | ||
| 98 | )))|((( | ||
| 99 | [[setMaxActive(int)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setMaxActive(int)||shape="rect"]] | ||
| 100 | ))) | ||
| 101 | |((( | ||
| 102 | maxIdle | ||
| 103 | )))|((( | ||
| 104 | (% style="color: rgb(0,0,0);" %)Maximum number of connections that can remain idle in the pool. | ||
| 105 | )))|((( | ||
| 106 | [[setMaxIdle(int)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setMaxIdle(int)||shape="rect"]] | ||
| 107 | ))) | ||
| 108 | |((( | ||
| 109 | maxOpenPreparedStatement | ||
| 110 | )))|((( | ||
| 111 | 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. | ||
| 112 | )))|((( | ||
| 113 | [[setMaxOpenPreparedStatements(int)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setMaxOpenPreparedStatements(int)||shape="rect"]] | ||
| 114 | ))) | ||
| 115 | |((( | ||
| 116 | maxWait | ||
| 117 | )))|((( | ||
| 118 | (% style="color: rgb(0,0,0);" %)Use a negative value for no limit. | ||
| 119 | )))|((( | ||
| 120 | [[setMaxWait(long)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setMaxWait(long)||shape="rect"]] | ||
| 121 | ))) | ||
| 122 | |((( | ||
| 123 | minEvictableIdleTimeMillis | ||
| 124 | )))|((( | ||
| 125 | (% style="color: rgb(0,0,0);" %)Minimum amount of time an object may sit idle in the pool. | ||
| 126 | )))|((( | ||
| 127 | [[setMinEvictableIdleTimeMillis(long)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setMinEvictableIdleTimeMillis(long)||shape="rect"]] | ||
| 128 | ))) | ||
| 129 | |((( | ||
| 130 | minIdle | ||
| 131 | )))|((( | ||
| 132 | (% style="color: rgb(0,0,0);" %)Minimum number of idle connections in the pool. | ||
| 133 | )))|((( | ||
| 134 | [[setMinIdle(int)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setMinIdle(int)||shape="rect"]] | ||
| 135 | ))) | ||
| 136 | |((( | ||
| 137 | {{code language="none"}} | ||
| 138 | datasource.<datasourcename>.password | ||
| 139 | {{/code}} | ||
| 140 | )))|((( | ||
| 141 | Required. JDBC Password. Changes have no effect after pool initialization. | ||
| 142 | )))|((( | ||
| 143 | [[setPassword(String)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setPassword(java.lang.String)||shape="rect"]] | ||
| 144 | ))) | ||
| 145 | |((( | ||
| 146 | poolPreparedStatements | ||
| 147 | )))|((( | ||
| 148 | (% style="color: rgb(0,0,0);" %)Whether to pool statements or not. Changes have no effect after pool initialization. | ||
| 149 | )))|((( | ||
| 150 | [[setPoolPreparedStatements(boolean)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setPoolPreparedStatements(boolean)||shape="rect"]] | ||
| 151 | ))) | ||
| 152 | |((( | ||
| 153 | removeAbandoned | ||
| 154 | )))|((( | ||
| 155 | - | ||
| 156 | )))|((( | ||
| 157 | [[setRemoveAbandoned(boolean)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setRemoveAbandoned(boolean)||shape="rect"]] | ||
| 158 | ))) | ||
| 159 | |((( | ||
| 160 | removeAbandonedTimeout | ||
| 161 | )))|((( | ||
| 162 | - | ||
| 163 | )))|((( | ||
| 164 | [[setRemoveAbandonedTimeout(int)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setRemoveAbandonedTimeout(int)||shape="rect"]] | ||
| 165 | ))) | ||
| 166 | |((( | ||
| 167 | testOnBorrow | ||
| 168 | )))|((( | ||
| 169 | Wether the validation query shall be executed before each "borrow" from the pool. | ||
| 170 | )))|((( | ||
| 171 | [[setTestOnBorrow(boolean)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setTestOnBorrow(boolean)||shape="rect"]] | ||
| 172 | ))) | ||
| 173 | |((( | ||
| 174 | testOnReturn | ||
| 175 | )))|((( | ||
| 176 | Wether the validation query shall be executed when a connection is returned to the pool. | ||
| 177 | )))|((( | ||
| 178 | [[setTestOnReturn(boolean)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setTestOnReturn(boolean)||shape="rect"]] | ||
| 179 | ))) | ||
| 180 | |((( | ||
| 181 | testWhileIdle | ||
| 182 | )))|((( | ||
| 183 | Wether the validation query shall be executed regularily to keep the connection alive. | ||
| 184 | )))|((( | ||
| 185 | [[setTestWhileIdle(boolean)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setTestWhileIdle(boolean)||shape="rect"]] | ||
| 186 | ))) | ||
| 187 | |((( | ||
| 188 | timeBetweenEvictionRunsMillis | ||
| 189 | )))|((( | ||
| 190 | - | ||
| 191 | )))|((( | ||
| 192 | [[setTimeBetweenEvictionRunsMillis(long)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setTimeBetweenEvictionRunsMillis(long)||shape="rect"]] | ||
| 193 | ))) | ||
| 194 | |((( | ||
| 195 | {{code language="none"}} | ||
| 196 | datasource.<datasourcename>.url | ||
| 197 | {{/code}} | ||
| 198 | )))|((( | ||
| 199 | 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. | ||
| 200 | )))|((( | ||
| 201 | [[setUrl(String)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setUrl(java.lang.String)||shape="rect"]] | ||
| 202 | ))) | ||
| 203 | |((( | ||
| 204 | {{code language="none"}} | ||
| 205 | datasource.<datasourcename>.username | ||
| 206 | {{/code}} | ||
| 207 | )))|((( | ||
| 208 | Required. JDBC User. Changes have no effect after pool initialization. | ||
| 209 | )))|((( | ||
| 210 | [[setUsername(String)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setUsername(java.lang.String)||shape="rect"]] | ||
| 211 | ))) | ||
| 212 | |((( | ||
| 213 | {{code language="none"}} | ||
| 214 | datasource.<datasourcename>.validationQuery | ||
| 215 | {{/code}} | ||
| 216 | )))|((( | ||
| 217 | Required. Validation query, executed to ensure the application receives a valid connection. | ||
| 218 | Common validation queries can be found in our [[doc:KH.Database Tips.JDBC Snippets.WebHome]]. | ||
| 219 | )))|((( | ||
| 220 | [[setValidationQuery(String)>>url:http://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#setValidationQuery(java.lang.String)||shape="rect"]] | ||
| 221 | ))) | ||
| 222 | |||
| 223 | 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. | ||
| 224 | |||
| 225 | Typical JDBC URLs and validation queries can be found in our [[doc:KH.Database Tips.JDBC Snippets.WebHome]]. |