*The PEAR support version of this just forwards calls relating to external
resources and cas pools to the parent.*
My understanding is that the RM's used by pears are created by copying the
5 resource maps and the CasManager --- so deleting one pear's RM would
delete the resources shared by the others.

We also have a use case where multiple pipelines need to share resources
but can't share the CasManager as their typesystems are different, and may
be created much later.  We can use the 5-arg constructor to create a
subclassed RMs that share the resources, but this doesn't share the
resources loaded by the original pipeline.  See Jira 5146

On Tue, Oct 18, 2016 at 1:48 PM, Marshall Schor (JIRA) <dev@uima.apache.org>

>      [ https://issues.apache.org/jira/browse/UIMA-2977?page=
> com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> Marshall Schor updated UIMA-2977:
> ---------------------------------
>     Fix Version/s: 3.0.0SDKexp
> > destroy method of shared resources never called
> > -----------------------------------------------
> >
> >                 Key: UIMA-2977
> >                 URL: https://issues.apache.org/jira/browse/UIMA-2977
> >             Project: UIMA
> >          Issue Type: Bug
> >          Components: Core Java Framework
> >            Reporter: Richard Eckart de Castilho
> >              Labels: Resources
> >             Fix For: 3.0.0SDKexp
> >
> >
> > Apparently the ResourceManager and the resources created by the manager
> do not participate in the usual component life cycle. On other components,
> such as analysis engines or readers, the destroy() method is called when
> the component is disposed of. External resources never get notified when
> they are no longer needed. At least any resources derived from Resource
> (e.g. DataResource and ParametrizedDataResource) should be notified. The
> SharedResourceObject interface does not define any such life cycle callback.
> > As a side-note: An alternative to the rather heavy-weight Resource
> interface of UIMA maybe be small life cycle interfaces such as the Spring
> InitializingBean and DisposableBean interfaces, or Java annotations marking
> initialization and destruction methods (e.g. @PostConstruct and
> @PreDestroy).
> --
> This message was sent by Atlassian JIRA
> (v6.3.4#6332)

Reply via email to