Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-2017

@Asynchronous methods execute sequentially, although being invoked asynchronously

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 4.6.0
    • None
    • ejb31
    • None

    Description

      A BaringController that is @Singleton, @Startup is invoked periodically through @Schedule method.

      In the @Schedule method of BaringController an @Asynchronous method of a @Stateful BaringWorker is being invoked.

      What I observe (see attached replication project) in log output (solely console output) is that although @Schedule method of BaringController is invoked DURING execution of @Asynchronous method of worker, the consecutive invocations of @Asynchronous method are sequencial!

      In other words - @Schedule method of BaringController is invoked during execution of @Asynchronous but the consecutive invocations of @Asynchronous "wait" until previous invocation is complete.

      Thus effectively I have only one running @Asynchronous thread at any given time.

      As I understood from comments in irc this should not be the case.

      Thanks and best regards
      Reinis

      Attachments

        1. infiniteloop.zip
          5 kB
          Reinis Vicups
        2. synchronousasync.zip
          12 kB
          Reinis Vicups

        Activity

          People

            romain.manni-bucau Romain Manni-Bucau
            reinis_v Reinis Vicups
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: