Skip to content

spring-modulith-events-jpa: Option to configure which TransactionManager that the JPA repository/registry should use #1219

@jhberges

Description

@jhberges

In scenarios with multiple datasources and transaction managers it would be nice to be able to set a specific TransactionManager instance and not rely on the default, in cases where other components also relies on the default one but expects it to be from a different datasource.

Something akin to what you might do with your own repos:

@EnableJpaRepositories(
   entityManagerFactoryRef = "forModulith",
   transactionManagerRef = "txmForModulith"
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions