-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi
I want add transactions to some methods in MVVM model (which annotated with @Command)
I try add @Transactional annotation but it not work as model not managed with spring.
Is necessary add aspectj advices or possible make this with pure java?
You shouldn't make a ViewModel's method to be transactional, this is not a good design.
A better way is your vm has a mySpringBean and such bean contains the transactional method.
You can take a look at these java srcs:
OrderViewViewModel.java
UserOrderManager.java
OrderViewModel is directly used by ZK, and transactional stuff is reserved in UserOrderManager.
Asked: 2012-10-02 10:27:01 +0800
Seen: 76 times
Last updated: Oct 03 '12