3 Replies Latest reply on Apr 3, 2006 2:57 AM by weston.price

    JBossWorkManager  waitForAll()

    hannes.koller

      Hi,
      I wonder if the JBossWorkManager provides an easy way to start several synchronous threads and wait for all of them to finish. I can vaguely remember I saw other WorkManager implementations which had a waitForAll(jobs..) method.. but I cant find such a method in the JBossWorkManager.. does a similar method exist, which accomplishes the same thing? Thanks for your time.

        • 1. Re: JBossWorkManager  waitForAll()
          weston.price

          This functionality is not within the WorkManagement API from the JCA spec, and thus isn't implemented in JBoss. More like as not it is an extension provided by other vendors. You could submit this as a feature request in JIRA.

          • 2. Re: JBossWorkManager  waitForAll()
            hannes.koller

            Hi,
            thanks for your reply. I had already feared that this is not part of the JCA spec.. I will submit it as a feature request. Thanks :)

            • 3. Re: JBossWorkManager  waitForAll()
              weston.price

              Note, there is nothing to prevent you from 'engineering' this yourself. Given n number of work instances, you just iterate over each one, callling doWork() or one of the other blocking methods from the WorkManagement API. Though, you should be careful about things like this as blocking in this case, depending upon the what you are trying to do, could have serious ramifications to both the startup (if you were doing something like this at bootstap) or general funcationality of the adapter itself. Sun recommonds WorkManagement calls being done in a non-blocking manner (ie scheduleWork()).