Oct 9th, 2012, 03:41 PM
Variable advice order
I've created an annotation/aspect combination to run some setup/tear down code around methods. I want it to run before and after @Transactional. I've marked my aspect class with @Order(Ordered.HIGHEST_PRECEDENCE) and it works ok, however it seems there should be a more flexible way. Is it possible to specify the order somewhere else, such as in the annotation itself? For example, what if in some cases I want to run advice A, B, and C in that order, but in other cases I want C, B, and A?