Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-5391

UIMA-AS: sendAndReceive() should throw Exception when client is in shutdown mode

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.10.2AS
    • Async Scaleout
    • None

    Description

      When an application calls UIMA-AS client sendAndReceive() its thread will block until a reply comes back or stop() is called.

      While a thread blocks in sendAndReceive() a System.exit() may be called causing the UIMA-AS client ShutdownHook to call stop(). This method will cleanup resources including a semaphore where an application thread blocks in sendAndReceive. In this case, the sendAndReceive() simply returns realizing that the client is not in a running state. The application is not aware that the sendAndReceive() was essentially interrupted as a reply had not been received. The application may consider the CAS as processed as there was no exception,

      The sendAndReceive() should throw an exception if UIMA-AS client stop() was called while an application thread blocked awaiting reply from a service. Throw ResourceProcessException with cause = UimaAsClientStoppingException. This will let the application know about the cause of the interrupt.

      Attachments

        Activity

          People

            cwiklik Jaroslaw Cwiklik
            cwiklik Jaroslaw Cwiklik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: