diff --git a/org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabase.java b/org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabase.java index 075eca8d3eff80094d656e0dd684bb6673a6d8a5..f480cb1c5c22170f278339e97bb5a40bdcd2394c 100644 --- a/org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabase.java +++ b/org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabase.java @@ -27,6 +27,7 @@ public interface EmbeddedDatabase extends DataSource { /** * Shutdown this embedded database. + * TODO - annotate with @PreDestroy for invocation by Spring container? */ void shutdown(); } diff --git a/org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseBuilder.java b/org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseBuilder.java index 2afd35d31565d4230fc5195b4a4e662df75a13b2..d74bf3a6aca0ff7da5f77d41408496692d6600d0 100644 --- a/org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseBuilder.java +++ b/org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseBuilder.java @@ -25,7 +25,7 @@ import org.springframework.core.io.ResourceLoader; * Usage example: *
  * EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
- * EmbeddedDatabase db = builder.schema("schema.sql").testData("test-data.sql").build();
+ * EmbeddedDatabase db = builder.script("schema.sql").script("test-data.sql").build();
  * db.shutdown();
  * 
* @author Keith Donald @@ -48,7 +48,7 @@ public class EmbeddedDatabaseBuilder { /** * Sets the name of the embedded database * Defaults to 'testdb' if not called. - * @param databaseType the embedded database type + * @param databaseName the database name * @return this, for fluent call chaining */ public EmbeddedDatabaseBuilder name(String databaseName) { @@ -59,7 +59,7 @@ public class EmbeddedDatabaseBuilder { /** * Sets the type of embedded database. * Defaults to HSQL if not called. - * @param databaseType the embedded database type + * @param databaseType the database type * @return this, for fluent call chaining */ public EmbeddedDatabaseBuilder type(EmbeddedDatabaseType databaseType) { @@ -86,7 +86,7 @@ public class EmbeddedDatabaseBuilder { } /** - * Factory method that creates a embedded database builder that loads resources relative to the provided class. + * Factory method that creates a EmbeddedDatabaseBuilder that loads SQL resources relative to the provided class. * @param clazz the class to load relative to * @return the embedded database builder */ @@ -105,7 +105,7 @@ public class EmbeddedDatabaseBuilder { /** * Factory method that builds a default EmbeddedDatabase instance. - * The default is HSQL with a schema created from classpath:schema.sql and test-data loaded from classpath:test-data.sql. + * The default instance is HSQL with a schema created from classpath:schema.sql and test-data loaded from classpath:test-data.sql. * @return an embedded database */ public static EmbeddedDatabase buildDefault() {