[
https://issues.apache.org/jira/browse/UIMA-4783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15197680#comment-15197680
]
Peter Klügl commented on UIMA-4783:
-----------------------------------
I added a boolean field and would now resolve this issue. Do you want to
validate the changes?
> 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
> Assignee: Peter Klügl
> Priority: Minor
> Fix For: 2.4.1ruta
>
>
> 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
(v6.3.4#6332)