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 https://github.com/spring-projects/spring-framework/issues/31157#issuecomment-1969324563.