Skip to content

Scheduled method is not invoked via proxy [SPR-13914] #18488

Open
@spring-projects-issues

Description

@spring-projects-issues

Mitchell Bosecke opened SPR-13914 and commented

I have several methods annotated with @scheduled and the majority of them run just fine but one of them in particular is not invoked via a proxy, it is invoked directly. The method is on a class annotated with @Service and @Transactional and that class has an appropriate interface with the method signature on it; i.e. I'm using JDK dynamic proxies.

The @scheduled annotation is on the implementation of the method. There is nothing unique about this method compared to my other @scheduled methods as far as I can tell.

That exact same method, when invoked via a web endpoint works as expected (via proxy and a transaction is available).

I've included some example code in the linked stack overflow post; let me know if I should copy some of that here.


Affects: 3.2.16

Reference URL: http://stackoverflow.com/questions/35184189/spring-scheduled-method-not-invoked-via-proxy-therefore-no-transaction

Issue Links:

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions