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

Ruta: Instantiate external engines only once when reloadScript=true


    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.1ruta
    • Fix Version/s: 2.5.0ruta
    • Component/s: Ruta
    • Labels:


      We are currently setting the parameter reloadScript to true in our RUTA engines so the dictionaries reload without us having to restart the service.

      But we have some external engines, invoked from RUTA scripts, which create connections to other servers, and until now we have been storing this connections as class instance variables in our external engines so they can be reused and the engine doesn't need to create a new connection for every document processed. And the initialize method checks whether the engine instance has already an open connection, so no matter how many times the initialize method is invoked only one connection is established.

      But if we invoke this external engine from a RUTA script that has the reloadScript parameter set to true, a new instance of the engine is created for every document processed, and therefore a new connection to the remote server will be established for each document too, regardless of the check for an existing connection in the initialize method.

      So for external engines that store some sort of state in instance variables, it would be great if RUTA only created one instance when the reloadScript is set to true.




            • Assignee:
              pkluegl Peter Klügl
              miguelal007 Miguel Alvarez
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: