Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6740900

Specify that listeners invoked via SendNotification should not block

XMLWordPrintable

    • b43
    • generic
    • generic
    • Not verified

      The NotificationBroadcasterSupport class explicitly documents that local listeners are invoked synchronously in the same thread, so they should not block for fear of holding up the MBean. Although we recommend in general that listeners not block (doing blocking work in another thread if necessary), it would be useful for the specification of the new SendNotification injection to say the same thing, or at least to warn that listeners *might* be invoked in the same thread (as they in fact are by the current implementation). This means that programmers will not worry about creating a new thread unnecessarily, since it is in fact necessary.

      (Noted by Dave Walend.)

            emcmanus Eamonn McManus
            emcmanus Eamonn McManus
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: