Announcement Announcement Module
Collapse
No announcement yet.
Injecting into @PersistenceContext fields Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Injecting into @PersistenceContext fields

    I had a hare-brained idea that I could use java config to inject EntityMangers that are autowired using the @PersistenceContext annotation. The EntityManagers are used in code that is demarcated with a @Transactional annotation. The goal being to swap-out EMs when testing so transactions may be rolled back. I've had a go to no avail. Anyone tried this or have any knowledge that might help???

    Thanks
Working...
X