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 On 10/18/2016 2:10 PM, Richard Eckart de Castilho wrote: >> On 18.10.2016, at 19:47, [email protected] 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 > >
