You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Jerry Cwiklik (JIRA)" <de...@uima.apache.org> on 2017/03/30 14:12:41 UTC
[jira] [Closed] (UIMA-5391) UIMA-AS: sendAndReceive() should throw
Exception when client is in shutdown mode
[ https://issues.apache.org/jira/browse/UIMA-5391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jerry Cwiklik closed UIMA-5391.
-------------------------------
Resolution: Fixed
Modified to throw an exception from sendAndReceive() when client is in shutdown mode and a thread awaits a reply from a remote service.
> 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)