Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-2977

destroy method of shared resources never called

    XMLWordPrintableJSON

Details

    Description

      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).

      Attachments

        Activity

          People

            schor Marshall Schor
            rec Richard Eckart de Castilho
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: