나는 persist 확장과 함께 guice 4.1을 사용하고 @Transactional이 작동되기를 기대하지만, 그렇지 않습니다. 사용 guice - @Transactional - not working
- 을에 따라 : 나는 위키을 따라이 게시물을 읽을 수 있지만 아무 소용이 :
Managing transactions in JavaSE with Hibernate and Guice
그냥 ... 내가 뭐하는 거지 다시 반복 google 's @ Transactional annotation
- guice가 관리하는 공개 또는 보호 된 메소드에서만 주석을 사용합니다.
- PersistService를 시작합니다 ...
시도 SO에 대한 솔루션을하지만, 명시 적으로 관리 끝났다. entityManager.getTransaction를() (시작); entityManager.persist (엔터티); entityManager.getTransaction(). commit(); – Justas