uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marshall Schor (JIRA)" <...@uima.apache.org>
Subject [jira] [Reopened] (UIMA-2977) destroy method of shared resources never called
Date Thu, 20 Oct 2016 14:47:58 GMT

     [ https://issues.apache.org/jira/browse/UIMA-2977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Marshall Schor reopened UIMA-2977:

due to confusion between Resource and resource Implementation.  Resource implements destroy(),
but the resource's implementation only needs to implement SharedResourceObject

> 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
>            Assignee: Marshall Schor
>              Labels: Resources
>             Fix For: 3.0.0SDKexp, 2.9.1SDK
> 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

View raw message