Torsten Krah opened SPR-12455 and commented

Status Quo

At the moment, <jdbc:embedded-database /> sets up an embedded database with a minimal set of needed database properties for each supported system, e.g. h2 dbName attribute. But if you want to configure some special database properties for the embedded database, e.g. H2 MVCC support or compatibility mode like Oracle, you would need to add this to the database URL string:

jdbc:h2:~/test;MVCC=TRUE&MODE=Oracle

Proposal

It would be nice if there were some new namespace element like <jdbc:custom-db-properties /> to add these options like in the following configuration example or some other solution where you can specify custom build options for the embedded database, which are applied during construction.

<jdbc:embedded-database>
  <jdbc:custom-db-properties>
    <map>
       <entry key="MODE" value="Oracle" />
       <entry key="MVCC" value="true" />
    </map>
  </jdbc:custom-db-properties>
</jdbc:embedded-database>

Affects: 3.1 GA

Issue Links: - #12030 Introduce support for persistent mode for embedded databases ("supersedes")

1 votes, 3 watchers

Comment From: spring-projects-issues

Sam Brannen commented

This is closely related to (and potentially supersedes) #12030.

Comment From: spring-projects-issues

Aliaksei Kalotkin commented

I created pull request. Take a look, please.

https://github.com/spring-projects/spring-framework/pull/832

Thanks.

Comment From: spring-projects-issues

Sam Brannen commented

I took a quick look and commented directly in your pull request.

Cheers,

Sam

Comment From: spring-projects-issues

Aliaksei Kalotkin commented

I fixed issues you have mentioned. Unfortunately I had to create new pull request: https://github.com/spring-projects/spring-framework/pull/833.

Sorry for inconvenience.

Thanks.

Comment From: snicoll

Closing as there hasn't been further interest from the community for this, see also https://github.com/spring-projects/spring-framework/pull/833#issuecomment-466419818