|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2016 the original author or authors. |
| 2 | + * Copyright 2002-2022 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -35,15 +35,17 @@ public interface DatabasePopulator {
|
35 | 35 | /**
|
36 | 36 | * Populate, initialize, or clean up the database using the provided JDBC
|
37 | 37 | * connection.
|
| 38 | + * <p><strong>Warning</strong>: Concrete implementations should not close |
| 39 | + * the provided {@link Connection}. |
38 | 40 | * <p>Concrete implementations <em>may</em> throw an {@link SQLException} if
|
39 | 41 | * an error is encountered but are <em>strongly encouraged</em> to throw a
|
40 | 42 | * specific {@link ScriptException} instead. For example, Spring's
|
41 | 43 | * {@link ResourceDatabasePopulator} and {@link DatabasePopulatorUtils} wrap
|
42 | 44 | * all {@code SQLExceptions} in {@code ScriptExceptions}.
|
43 |
| - * @param connection the JDBC connection to use to populate the db; already |
44 |
| - * configured and ready to use; never {@code null} |
| 45 | + * @param connection the JDBC connection to use; already configured and |
| 46 | + * ready to use; never {@code null} |
45 | 47 | * @throws SQLException if an unrecoverable data access exception occurs
|
46 |
| - * during database population |
| 48 | + * while interacting with the database |
47 | 49 | * @throws ScriptException in all other error cases
|
48 | 50 | * @see DatabasePopulatorUtils#execute
|
49 | 51 | */
|
|
0 commit comments