Uploaded image for project: 'Hibernate ORM'
  1. HHH-13432

EntityManagerFactory no longer exposes "javax.persistence.nonJtaDataSource"

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects versions: 5.4.3
    • Fix versions: None
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Worked in:
    • Last commented by a user?:
      true
    • Sprint:

      Description

      In Hibernate 4.3.x the following code would return a non-null DataSource:

      Object dataSource = entityManagerFactory.getProperties().get("javax.persistence.nonJtaDataSource");
      

      In Hibernate 5 this no longer appears to work. The EntityManagerFactoryBuilderImpl contains the following line which seems to suggest that the property should be exposed but, as far as I can tell, the configurationValues are no longer copied to the EntityManagerFactory properties. I wonder if instead ssrBuilder.applySetting should now be used?

      This issue was originally identified by a Spring Boot user and more background can be found here. The user has also attached a project that replicates the issue when FirstDbConfig and SecondDbConfig are edited to remove his workaround.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: