Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-6826

EJB's async methods' Future#get should treat zero timeout as "don't wait"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.1.0.DR8
    • None
    • EJB
    • None

    Description

      Say there is an asynchronous EJB method:

      @Asynchronous
      public Future<Boolean> method() {
         ...
      }
      

      Calling Future#get with a zero timeout:

      if (bean.method().get(0, TimeUnit.MILLISECONDS))
      

      results in a block until the task is finished.
      Instead I expected zero waiting, because java.util.concurrent.Future.get(long, TimeUnit) doesn't specify any special treatment for a zero timeout value.

      Attachments

        Issue Links

          Activity

            People

              istudens@redhat.com Ivo Studensky
              istudens@redhat.com Ivo Studensky
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: