@@ -14,12 +14,13 @@ public class DataSourceConfig {
1414
1515 private static final String POSTGRES = "postgres" ;
1616
17- private InitDatabase initDatabase ;
1817 private String readOnlyUrl ;
1918 private String url ;
2019 private String username ;
2120 private String password ;
2221 private String schema ;
22+ private String driver ;
23+ private InitDatabase initDatabase ;
2324 /**
2425 * The name of the database platform (for use with ownerUsername and InitDatabase).
2526 */
@@ -32,7 +33,6 @@ public class DataSourceConfig {
3233 * The optional database owner password (for running InitDatabase).
3334 */
3435 private String ownerPassword ;
35- private String driver ;
3636 private int minConnections = 2 ;
3737 private int maxConnections = 200 ;
3838 private int isolationLevel = Connection .TRANSACTION_READ_COMMITTED ;
@@ -338,7 +338,6 @@ public DataSourceConfig setListener(DataSourcePoolListener listener) {
338338 * <p>
339339 * Note that if this is not set then it can get defaulted from the
340340 * DatabasePlatform.
341- * </p>
342341 */
343342 public String getHeartbeatSql () {
344343 return heartbeatSql ;
@@ -349,7 +348,6 @@ public String getHeartbeatSql() {
349348 * <p>
350349 * Note that if this is not set then it can get defaulted from the
351350 * DatabasePlatform.
352- * </p>
353351 */
354352 public DataSourceConfig setHeartbeatSql (String heartbeatSql ) {
355353 this .heartbeatSql = heartbeatSql ;
@@ -361,7 +359,6 @@ public DataSourceConfig setHeartbeatSql(String heartbeatSql) {
361359 * <p>
362360 * This is the expected frequency in which the DataSource should be checked to
363361 * make sure it is healthy and trim idle connections.
364- * </p>
365362 */
366363 public int getHeartbeatFreqSecs () {
367364 return heartbeatFreqSecs ;
@@ -395,10 +392,8 @@ public DataSourceConfig setHeartbeatTimeoutSeconds(int heartbeatTimeoutSeconds)
395392 * from the pool.
396393 * <p>
397394 * This can be used to diagnose a suspected connection pool leak.
398- * </p>
399395 * <p>
400396 * Obviously this has a performance overhead.
401- * </p>
402397 */
403398 public boolean isCaptureStackTrace () {
404399 return captureStackTrace ;
@@ -409,10 +404,8 @@ public boolean isCaptureStackTrace() {
409404 * from the pool.
410405 * <p>
411406 * This can be used to diagnose a suspected connection pool leak.
412- * </p>
413407 * <p>
414408 * Obviously this has a performance overhead.
415- * </p>
416409 */
417410 public DataSourceConfig setCaptureStackTrace (boolean captureStackTrace ) {
418411 this .captureStackTrace = captureStackTrace ;
@@ -504,7 +497,6 @@ public DataSourceConfig setWaitTimeoutMillis(int waitTimeoutMillis) {
504497 * <p>
505498 * This is so that the pool after a busy period can trend over time back
506499 * towards the minimum connections.
507- * </p>
508500 */
509501 public int getMaxInactiveTimeSecs () {
510502 return maxInactiveTimeSecs ;
@@ -514,7 +506,6 @@ public int getMaxInactiveTimeSecs() {
514506 * Return the maximum age a connection is allowed to be before it is closed.
515507 * <p>
516508 * This can be used to close really old connections.
517- * </p>
518509 */
519510 public int getMaxAgeMinutes () {
520511 return maxAgeMinutes ;
@@ -534,7 +525,6 @@ public DataSourceConfig setMaxAgeMinutes(int maxAgeMinutes) {
534525 * <p>
535526 * This is so that the pool after a busy period can trend over time back
536527 * towards the minimum connections.
537- * </p>
538528 */
539529 public DataSourceConfig setMaxInactiveTimeSecs (int maxInactiveTimeSecs ) {
540530 this .maxInactiveTimeSecs = maxInactiveTimeSecs ;
@@ -547,7 +537,6 @@ public DataSourceConfig setMaxInactiveTimeSecs(int maxInactiveTimeSecs) {
547537 * <p>
548538 * This defaults to 59 seconds meaning that the pool trim check will run every
549539 * minute assuming the heart beat check runs every 30 seconds.
550- * </p>
551540 */
552541 public int getTrimPoolFreqSecs () {
553542 return trimPoolFreqSecs ;
@@ -580,7 +569,6 @@ public DataSourceConfig setPoolListener(String poolListener) {
580569 * Return true if the DataSource should be left offline.
581570 * <p>
582571 * This is to support DDL generation etc without having a real database.
583- * </p>
584572 */
585573 public boolean isOffline () {
586574 return offline ;
@@ -594,7 +582,6 @@ public boolean isOffline() {
594582 * It enables to initialize the Ebean-Server if the db-server is not yet up. In
595583 * this case, a ({@link DataSourceAlert#dataSourceUp(javax.sql.DataSource)} is
596584 * fired when DS gets up either immediately at start-up or later.)
597- * </p>
598585 */
599586 public boolean isFailOnStart () {
600587 return failOnStart ;
@@ -647,7 +634,7 @@ public DataSourceConfig setCustomProperties(Map<String, String> customProperties
647634 }
648635
649636 /**
650- * Add an additional driver property.
637+ * Add a driver property.
651638 * <pre>{@code
652639 *
653640 * config.addProperty("useSSL", false);
@@ -663,7 +650,7 @@ public DataSourceConfig addProperty(String key, String value) {
663650 }
664651
665652 /**
666- * Add an additional driver property.
653+ * Add a driver property.
667654 * <pre>{@code
668655 *
669656 * config.addProperty("useSSL", false);
@@ -675,7 +662,7 @@ public DataSourceConfig addProperty(String key, boolean value) {
675662 }
676663
677664 /**
678- * Add an additional driver property.
665+ * Add a driver property.
679666 * <pre>{@code
680667 *
681668 * config.addProperty("useSSL", false);
@@ -781,7 +768,6 @@ public boolean useInitDatabase() {
781768 * Load the settings from the properties supplied.
782769 * <p>
783770 * You can use this when you have your own properties to use for configuration.
784- * </p>
785771 *
786772 * @param properties the properties to configure the dataSource
787773 * @param serverName the name of the specific dataSource (optional)
0 commit comments