Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-17166

@Scheduled task runs twice on bean with target-class scoped proxy (when injected)

    XMLWordPrintable

    Details

      Description

      When a proxied bean has a @Scheduled annotation, that task is executed twice as if there would be two beans. As a user I would expect that a proxied bean still behaves and acts as there would be only one bean. I would expect the task to be executed only once.

      If you run the example, you notice two outputs every second, while I would expect only one output per second.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              malkusch Markus Malkusch
              Last updater:
              Spring Issuemaster
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 25 weeks, 2 days ago