Reorganize embedded database sections in reference manual

This commit is contained in:
Sam Brannen 2015-07-29 20:43:30 +02:00
parent c5b9b396aa
commit e0fbd2d5b9
1 changed files with 19 additions and 18 deletions

View File

@ -4681,40 +4681,27 @@ public class DataSourceConfig {
} }
---- ----
[[jdbc-embedded-database-types]]
[[jdbc-embedded-database-extension]] ==== Selecting the embedded database type
==== Extending the embedded database support
Spring JDBC embedded database support can be extended in two ways:
* Implement `EmbeddedDatabaseConfigurer` to support a new embedded database type.
* Implement `DataSourceFactory` to support a new `DataSource` implementation, such as a
connection pool to manage embedded database connections.
You are encouraged to contribute back extensions to the Spring community at
https://jira.spring.io/browse/SPR[jira.spring.io].
[[jdbc-embedded-database-using-HSQL]] [[jdbc-embedded-database-using-HSQL]]
==== Using HSQL ===== Using HSQL
Spring supports HSQL 1.8.0 and above. HSQL is the default embedded database if no type is Spring supports HSQL 1.8.0 and above. HSQL is the default embedded database if no type is
specified explicitly. To specify HSQL explicitly, set the `type` attribute of the 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 `embedded-database` tag to `HSQL`. If you are using the builder API, call the
`setType(EmbeddedDatabaseType)` method with `EmbeddedDatabaseType.HSQL`. `setType(EmbeddedDatabaseType)` method with `EmbeddedDatabaseType.HSQL`.
[[jdbc-embedded-database-using-H2]] [[jdbc-embedded-database-using-H2]]
==== Using H2 ===== Using H2
Spring supports the H2 database as well. To enable H2, set the `type` attribute of the Spring supports the H2 database as well. To enable H2, set the `type` attribute of the
`embedded-database` tag to `H2`. If you are using the builder API, call the `embedded-database` tag to `H2`. If you are using the builder API, call the
`setType(EmbeddedDatabaseType)` method with `EmbeddedDatabaseType.H2`. `setType(EmbeddedDatabaseType)` method with `EmbeddedDatabaseType.H2`.
[[jdbc-embedded-database-using-Derby]] [[jdbc-embedded-database-using-Derby]]
==== Using Derby ===== Using Derby
Spring also supports Apache Derby 10.5 and above. To enable Derby, set the `type` Spring also supports Apache Derby 10.5 and above. To enable Derby, set the `type`
attribute of the `embedded-database` tag to `DERBY`. If you are using the builder API, attribute of the `embedded-database` tag to `DERBY`. If you are using the builder API,
call the `setType(EmbeddedDatabaseType)` method with `EmbeddedDatabaseType.DERBY`. call the `setType(EmbeddedDatabaseType)` method with `EmbeddedDatabaseType.DERBY`.
@ -4763,6 +4750,20 @@ Framework>> and configuring the embedded database as a bean in the Spring
[[jdbc-embedded-database-extension]]
==== Extending the embedded database support
Spring JDBC embedded database support can be extended in two ways:
* Implement `EmbeddedDatabaseConfigurer` to support a new embedded database type.
* Implement `DataSourceFactory` to support a new `DataSource` implementation, such as a
connection pool to manage embedded database connections.
You are encouraged to contribute back extensions to the Spring community at
https://jira.spring.io/browse/SPR[jira.spring.io].
[[jdbc-intializing-datasource]] [[jdbc-intializing-datasource]]
=== Initializing a DataSource === Initializing a DataSource
The `org.springframework.jdbc.datasource.init` package provides support for initializing The `org.springframework.jdbc.datasource.init` package provides support for initializing