Jerry Cwiklik created UIMA-5391:
-----------------------------------

             Summary: UIMA-AS: sendAndReceive() should throw Exception when 
client is in shutdown mode
                 Key: UIMA-5391
                 URL: https://issues.apache.org/jira/browse/UIMA-5391
             Project: UIMA
          Issue Type: Bug
          Components: Async Scaleout
            Reporter: Jerry Cwiklik
            Assignee: Jerry Cwiklik
             Fix For: 2.10.0AS


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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to