This is not directly related to wicket but I guess that many might be using warp-persist in their project.
I am using @Transactional annotation to mark my methods in the service layer. Everything was working as expected until … until I did something like this:
public class UserService { public User createNewUser (String name) { ... createNewUser(name, defaultPermission); ... } @Transactional private User createNewUser (Stringname, Permission permission) { ... } }
The surprise here is that in this case the transaction will never be created! The @Transactional works only on non private methods since private methods can not be intercepted for transaction wrapping.
This is well documented here. A classic case of RTFM







0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.