Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-16016

Deprecate HibernateJpaSessionFactoryBean (against Hibernate 5.2)

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 4.3.11, 5.0 RC4, 5.0 GA
    • Fix Version/s: 4.3.12, 5.0.1
    • Component/s: Data:ORM
    • Labels:

      Description

      We're in the process migrating a large spring application to spring-boot and data-jpa. Almost all of the dao's use SessionFactory resource and Hibernate 4's Criteria classes.

      Since it's not possible to instantly convert all those dao methods, so we decided to create a SessionFactory bean based on this reference documentation and gradually do jpa migration process.

      But we end up with BeanCurrentlyInCreationException (attached the logs). Reproduced the same issue with a sample project and referred the gitlab url for that project. Until now, i have not yet come up with a workaround, so our migration process is blocked on this.

      Glad to know if there is any workaround or any other ways to create SessionFactory bean.

      Note: Existing application uses thread based session for transaction commits and rollbacks, so it's not feasible to use entityManager.unwrap(Session.class) as it's not thread based at all.

        Attachments

          Activity

            People

            • Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              krnaveen14 Naveen Kumar
              Last updater:
              Spring Issuemaster
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                26 weeks ago