Skip to content

Introduce database-name attribute in <jdbc:embedded-database /> [SPR-12835] #17432

@spring-projects-issues

Description

@spring-projects-issues

Sam Brannen opened SPR-12835 and commented

Status Quo

Since its inception, the <jdbc:embedded-database /> XML namespace element (or more specifically the EmbeddedDatabaseBeanDefinitionParser) has set the name of the embedded database that it creates to the value of the id attribute. This makes it impossible to reuse an XML configuration file containing such a bean definition in multiple application contexts loaded within the same JVM -- for example, by importing the common test data source configuration into multiple contexts loaded by the Spring TestContext Framework.

Furthermore, the EmbeddedDatabaseBuilder already provides support for setting the name in Java Config.

Deliverables

  1. Introduce a database-name attribute in <jdbc:embedded-database /> to bring XML configuration of embedded databases on par with the support in Java Config.

Affects: 3.0 GA

Issue Links:

Referenced from: commits ab771df, c36c6cb

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)in: testIssues in the test moduletype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions