uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: ResourceManager lifecycle
Date Mon, 24 Oct 2016 14:16:01 GMT
Resource Managers are not always implicitly created by the framework. 
Sometimes, users create RMs exactly for the purpose of having some parts of them
shared among multiple pipelines / resources.

A possible use case:
* user code calls UIMA framework which creates RM as a side effect of user
calling produceResource (or one of its specializations, e.g. produceAnalysisEngine).
* user gets that RM, and then passes it to another produceResource call.

So we have mixed ownership: the first call the framework created the RM, the
2nd, the RM was passed in by the user.

When the use "destroys" (for example) the Analysis Engine produced by the first
call a simple approach would be to destroy its RM, but that could break the
second use.


On 10/18/2016 2:10 PM, Richard Eckart de Castilho wrote:
>> On 18.10.2016, at 19:47, schor@apache.org wrote:
>> +   * The framework does not call this method; it is up to the containing application
to decide if and when
>> +   * a ResourceManager instance should be destroyed.  This is because the containing
application is the only
>> +   * knowledgeable source; for example a single ResourceManager might be used for
multiple UIMA Pipelines.
>> +   */
> ResourceManagers are implicitly created by the framework. When the framework creates
a ResourceManager, then it should also destroy it.
> Best,
> -- Richard

View raw message