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 2014/03/03 23:08:31 UTC

[jira] [Created] (UIMA-3665) UIMA-AS JmsStub code not clearing static Map

Jerry Cwiklik created UIMA-3665:
-----------------------------------

             Summary: UIMA-AS JmsStub code not clearing static Map
                 Key: UIMA-3665
                 URL: https://issues.apache.org/jira/browse/UIMA-3665
             Project: UIMA
          Issue Type: Bug
          Components: Async Scaleout
    Affects Versions: 2.4.2AS
            Reporter: Jerry Cwiklik
            Assignee: Jerry Cwiklik
             Fix For: 2.5.0AS


The UIMA-AS JmsAnalysisEngineServiceStub contains a static Map which holds a reference to a shared UIMA-AS client instance. This shared client is used by all AE instances in the JVM.

This implementation causes the extended tests to fail. There are a number junit tests that test different scenarios where JmsAnalysisEngineServiceStub  is used. The first such test succeeds but subsequent ones fail with Exception "Uima EE Client Not in Running State". 

This is caused by the fact that the static Map in JmsAnalysisEngineServiceStub is not being cleared when each test is done. It contains a stale reference from the previous junit test. This stale reference has been stopped and its "running" flag=false causing the above mentioned exception.

There is also another problem related to the lifecycle mgmt of the shared uima-as client instance. In the current code, the shared instance is stopped   when destroy() method is called. This method is called N times, where N= number of AE instances. So on the first destroy() call, the uima-as client is stopped leaving the client in !running state. Subsequent invocations to sendAndReceive will fail again with above mentioned exception.




--
This message was sent by Atlassian JIRA
(v6.2#6252)