From e97c2bd7e9ded9b996e944b8a4355a3d2c9ca8d9 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Wed, 11 Nov 2009 23:10:04 +0000 Subject: [PATCH] rc2 updates --- spring-framework-reference/src/jdbc.xml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/spring-framework-reference/src/jdbc.xml b/spring-framework-reference/src/jdbc.xml index 01a2bce21e..bb0e78838c 100644 --- a/spring-framework-reference/src/jdbc.xml +++ b/spring-framework-reference/src/jdbc.xml @@ -2779,7 +2779,7 @@ SqlTypeValue value = new AbstractSqlTypeValue() { this when you need to create an embedded database instance in a standalone environment, such as a data access object unit test: EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder(); - EmbeddedDatabase db = builder.type(H2).script("schema.sql").script("test-data.sql").build(); + EmbeddedDatabase db = builder.setType(H2).addScript("my-schema.sql").addScript("my-test-data.sql").build(); // do stuff against the db (EmbeddedDatabase extends javax.sql.DataSource) db.shutdown() @@ -2812,12 +2812,11 @@ SqlTypeValue value = new AbstractSqlTypeValue() { Using HSQL Spring supports HSQL 1.0.0 to 2.0.0. HSQL is the default embedded - database if no type is specified explicitly. To specify HSQL explicitly, - set - the type attribute of the + database if no type is specified explicitly. To specify HSQL explicitly, + set the type attribute of the embedded-database tag to HSQL. If you are using the builder API, call the - type(EmbeddedDatabaseType) method with + setType(EmbeddedDatabaseType) method with EmbeddedDatabaseType.HSQL. @@ -2828,7 +2827,7 @@ SqlTypeValue value = new AbstractSqlTypeValue() { type attribute of the embedded-database tag to H2. If you are using the builder API, call the - type(EmbeddedDatabaseType) method with + setType(EmbeddedDatabaseType) method with EmbeddedDatabaseType.H2. @@ -2839,7 +2838,7 @@ SqlTypeValue value = new AbstractSqlTypeValue() { set the type attribute of the embedded-database tag to Derby. If using the builder API, call the - type(EmbeddedDatabaseType) method with + setType(EmbeddedDatabaseType) method with EmbeddedDatabaseType.Derby. @@ -2856,8 +2855,8 @@ public class DataAccessUnitTestTemplate { @Before public void setUp() { - // creates a HSQL in-memory db populated from classpath:schema.sql and classpath:test-data.sql - db = EmbeddedDatabaseBuilder.buildDefault(); + // creates a HSQL in-memory db populated from default scripts classpath:schema.sql and classpath:test-data.sql + db = new EmbeddedDatabaseBuilder().addDefaultScripts().build(); } @Test -- GitLab