Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-2791

Spring JpaTransactionManager should be used instead of both: DroolsSpringTransactionManager and DroolsSpringJpaManager

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 5.1.1.FINAL, FUTURE
    • None
    • Medium

    Description

      Instead of having two different components: "DroolsSpringTransactionManager" and "DroolsSpringJpaManager" that aim to do the work of "org.springframework.orm.jpa.JpaTransactionManager", and trying to fit a JTA model into it, the Spring's "JpaTransactionManager" itself should be used.

      And instead of manually managing and constantly getting references to a "proper entity manager" from JpaManger within a SingleSessionCommandService, a @PersistenceContext should be injected. This will decouple SingleSessionCommandService from JpaManager interface, and will allow any JPA provider to inject an entity manager.

      It has more benefits, such as trust in underline JPA providers ( e.g. Hibernate ) and Spring Transaction Management capabilities to manage the process that they are actually excellent at.

      /Anatoly

      Attachments

        Activity

          People

            mproctor@redhat.com Mark Proctor
            Anat0ly Anatoly Polinsky (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Archived:

              Time Tracking

                Estimated:
                Original Estimate - 2 days
                2d
                Remaining:
                Remaining Estimate - 2 days
                2d
                Logged:
                Time Spent - Not Specified
                Not Specified

                PagerDuty