Announcement Announcement Module
Collapse
No announcement yet.
Spring Data JPA fails to invoke JtaTransactionManager Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Data JPA fails to invoke JtaTransactionManager

    I am using Spring Data JPA (SDJ) and during my integration tests, I've come across a weird situation - I've probably misconfigured something, but I fail to see what that might be and this might hint at a bug or some declarative inconsistency.

    In a nutshell - it would seem that SDJ simply fails to invoke an implementation of Spring'sPlatformTransactionManager once there is any kind of method declared on repository interface (i.e., the one that extends JpaRepository<T, ID>).

    I've drilled down this behaviour to a pretty banal reason - in this situation, JtaTransactionManager's setter simply does not invoke, but I couldn't figure out the reason.
    Should interface lack any method declaration - everything works as is it should: theJtaTransactionManager setter invokes normally and transactions initiate, but I really dislike writing unneeded custom Repositories just to get around a possible misconfiguration/bug (and I have confirmed implementing a custom repository indeed circumvents mentioned behaviour).

    I have documented my findings on StackOverflow, so to avoid duplication, here's the link to that thread.

    Any assistance is greatly appreciated.
Working...
X