Spring's JpaTransactionManager should be used instead of both:
DroolsSpringTransactionManager and DroolsSpringJpaManager
------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-2791
URL:
https://jira.jboss.org/browse/JBRULES-2791
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 5.1.1.FINAL, FUTURE
Environment: Spring Based Applications
Reporter: Anatoly Polinsky
Assignee: Mark Proctor
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
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira