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

UIMA-AS JmsStub code not clearing static Map

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.2AS
    • Fix Version/s: 2.6.0AS
    • Component/s: Async Scaleout
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              cwiklik Jerry Cwiklik
              Reporter:
              cwiklik Jerry Cwiklik
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: