Skip to content

Doc: Execution order for aspectj aspects and <tx:annotation-driven> [SPR-3164] #7850

@spring-projects-issues

Description

@spring-projects-issues

Dan Luputan opened SPR-3164 and commented

This is related to #7190, which is needed but not complete.

I have one aspectj around aspect (an exception handler) which has to surround the txn interceptor. So I make it implement Ordered and give an order value lower than the order attribute in the tx:annotation-driven.
Now, the org.springframework.aop.aspectj.autoproxy.AspectJPrecedenceComparator compares the advisor order and even if the txn advisor has the right order the exception handler advisor still has the max int order, so the order present in the advice is not used.

Since the documentation says the aspects implement Ordered to control the execution order this might also be a bug.
I tested with 2.0.3 build 104.


Affects: 2.0.3

Issue Links:

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)in: dataIssues in data modules (jdbc, orm, oxm, tx)type: taskA general task

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions