uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Miguel Alvarez (JIRA)" <...@uima.apache.org>
Subject [jira] [Created] (UIMA-4783) Ruta: Instantiate external engines only once when reloadScript=true
Date Tue, 02 Feb 2016 17:39:40 GMT
Miguel Alvarez created UIMA-4783:

             Summary: Ruta: Instantiate external engines only once when reloadScript=true
                 Key: UIMA-4783
                 URL: https://issues.apache.org/jira/browse/UIMA-4783
             Project: UIMA
          Issue Type: Improvement
          Components: ruta
    Affects Versions: 2.3.1ruta
            Reporter: Miguel Alvarez
            Priority: Minor

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.

This message was sent by Atlassian JIRA

View raw message