Skip to content

Avoid blocking access to EntityManagerFactory in DataSourceInitializedPublisher #14061

@odrotbohm

Description

@odrotbohm

During our optimization efforts in JPA bootstrapping we stumbled above DataSourceInitializedPublisher.publishEventIfRequired(…) calling EntityManagerFactory.getProperties().

In case of an asynchronously bootstrapped EntityManagerFactory this will cause the initialization to block and prevent the container from continuing to initialize other components. I wonder it there was a way to rather consume the DataSource by inspecting EntityManagerFactoryInfo.getDataSource() as method calls to this interface do not trigger the blocking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions