[ 
https://issues.apache.org/jira/browse/UIMA-2977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13682713#comment-13682713
 ] 

Marshall Schor commented on UIMA-2977:
--------------------------------------

The current implementation appears to divide Resources into two (or more) 
categories.  I see, for instance, one split more or less along the lines - 
things like Annotators which can have External Resource bindings, and things 
like External Resources, which are in some respects more "primitive", and do 
not really fully implement the Resource interface; I suspect there are other 
dimensions too.

To proceed on this topic, I think we will need to categorize all the resources, 
characterize the (subset of) the Resource functionality each category supports, 
and then make reasoned arguments discussing the pros/cons for changing these.
                
> 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
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to