Skip to content

Add DataSource configuration/exposure to LocalEntityManagerFactoryBean #32344

@jhoeller

Description

@jhoeller

In contrast to the commonly used LocalContainerEntityManagerFactoryBean, the simpler LocalEntityManagerFactoryBean does not accept or expose a JDBC DataSource reference. Based on the "jakarta.persistence.dataSource" property (which can be used for passing in a DataSource reference via our jpaPropertyMap already), a setDataSource method and in particular a getDataSource method for autodetection in JpaTransactionManager are worth exposing.

Further configuration options could be added to LocalEntityManagerFactoryBean based on JPA 3.2, once we are on a Jakarta EE 11 baseline; see #31157 (comment).

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions