UIMA
  1. UIMA
  2. UIMA-1435

UIMA AS client creates too many JMS connections to a broker

    Details

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

      Description

      Currently, a JMS Connection is created for every instance of UIMA AS client. When scaling UIMA AS client in the same JVM, this results in many connections to the same Broker. As optimization, the first instance of UIMA AS client should create a single connection to the broker and store it in a static data structure. Subsequent UIMA AS client instances should reuse the connection to create JMS sessions. The connection will be closed when all client instances call stop() method.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        13d 17h 6m 1 Jerry Cwiklik 27/Jul/09 14:31
        Closed Closed Reopened Reopened
        802d 3h 38m 1 Jerry Cwiklik 07/Oct/11 18:10
        Reopened Reopened Closed Closed
        26d 1h 35m 1 Jerry Cwiklik 02/Nov/11 18:45
        Jerry Cwiklik made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Fix Version/s 2.4.0AS [ 12316312 ]
        Resolution Fixed [ 1 ]
        Hide
        Jerry Cwiklik added a comment -

        Modified UIMA AS client side to allow multiple connections to brokers. Previously only one connection was allowed preventing an application from deploying multiple UIMA AS client instances, each connecting to a different broker. The client manages a pool of connections now. Added a new test case to test support for this new feature.

        Show
        Jerry Cwiklik added a comment - Modified UIMA AS client side to allow multiple connections to brokers. Previously only one connection was allowed preventing an application from deploying multiple UIMA AS client instances, each connecting to a different broker. The client manages a pool of connections now. Added a new test case to test support for this new feature.
        Jerry Cwiklik made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Hide
        Jerry Cwiklik added a comment -

        The optimization implemented here should be parametrized to allow deployment of multiple UIMA AS clients in the same jvm, each connecting to a different broker. Current code does not allow it.

        Show
        Jerry Cwiklik added a comment - The optimization implemented here should be parametrized to allow deployment of multiple UIMA AS clients in the same jvm, each connecting to a different broker. Current code does not allow it.
        Jerry Cwiklik made changes -
        Fix Version/s 2.3AS [ 12313219 ]
        Jerry Cwiklik made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Hide
        Jerry Cwiklik added a comment -

        Multiple UIMA AS clients deployed in the same JVM share a single JMS Connection to a Broker.

        Show
        Jerry Cwiklik added a comment - Multiple UIMA AS clients deployed in the same JVM share a single JMS Connection to a Broker.
        Hide
        Jerry Cwiklik added a comment -

        Updated the code to enable reuse of a cached JMS connection. The first instance of UIMA AS client creates the connection and stores it in a static SharedConnection object. This object maintains the JMS Connection as well as total number of UIMA AS clients. Every time a client calls initialize() method, the SharedConnection object increments the client counter. Every time a client calls stop(), the counter is decremented. When the count reaches 0, the connection is closed. This change reduces number of threads the broker needs to manage.

        Show
        Jerry Cwiklik added a comment - Updated the code to enable reuse of a cached JMS connection. The first instance of UIMA AS client creates the connection and stores it in a static SharedConnection object. This object maintains the JMS Connection as well as total number of UIMA AS clients. Every time a client calls initialize() method, the SharedConnection object increments the client counter. Every time a client calls stop(), the counter is decremented. When the count reaches 0, the connection is closed. This change reduces number of threads the broker needs to manage.
        Jerry Cwiklik created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development