uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Eckart de Castilho <...@apache.org>
Subject Re: ResourceManager lifecycle
Date Mon, 24 Oct 2016 14:25:15 GMT
If an RM is implicitly created, then I would consider the AE that implicitly
created the RM the owner of it. If a user obtains that RM and passes it on,
then that must be under the consciousness that the user is *not* the owner.

If the user wants to be the owner of an RM, then the user should create it
and pass it to the AE in the first place.

Do you think this is not sensible/conveyable to users?

Since so far, RMs did not support destroy at all, I believe it should also
not break existing code if we implement it in this way.

Best,

-- Richard

> On 24.10.2016, at 16:16, Marshall Schor <msa@schor.com> wrote:
> 
> 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.
> 
> -Marshall


Mime
View raw message