]]>org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-onlyhttp://m.tkk7.com/honzeland/archive/2010/02/24/313829.htmlhonzelandhonzelandWed, 24 Feb 2010 10:02:00 GMThttp://m.tkk7.com/honzeland/archive/2010/02/24/313829.htmlhttp://m.tkk7.com/honzeland/comments/313829.htmlhttp://m.tkk7.com/honzeland/archive/2010/02/24/313829.html#Feedback0http://m.tkk7.com/honzeland/comments/commentRss/313829.htmlhttp://m.tkk7.com/honzeland/services/trackbacks/313829.html
@Transactional publicvoid foo() { try{
bar();
} catch (RuntimeException re) { // caught but not throw further
}
}
Since this mechanism is based on proxies, only 'external' method calls coming in through the proxy will be intercepted. This means that 'self-invocation', i.e. a method within the target object calling some other method of the target object, won't lead to an actual transaction at runtime even if the invoked method is marked with @Transactional!
鍙互閫氳繃閰嶇疆log4j鏉ebug Spring浜嬪姟鑾峰彇鎯呭喌錛?br />
To delve more into it I would turn up your log4j logging to debug and also look at what ExerciseModuleController is doing at line 91, e.g.: add a logger for org.springframework.transaction
]]>Discussion for Open Session In View Pattern for Hibernatehttp://m.tkk7.com/honzeland/archive/2010/01/29/311244.htmlhonzelandhonzelandFri, 29 Jan 2010 09:20:00 GMThttp://m.tkk7.com/honzeland/archive/2010/01/29/311244.htmlhttp://m.tkk7.com/honzeland/comments/311244.htmlhttp://m.tkk7.com/honzeland/archive/2010/01/29/311244.html#Feedback0http://m.tkk7.com/honzeland/comments/commentRss/311244.htmlhttp://m.tkk7.com/honzeland/services/trackbacks/311244.htmlhttp://www.mail-archive.com/stripes-users@lists.sourceforge.net/msg02908.html