You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <de...@uima.apache.org> on 2016/10/19 14:58:59 UTC

[jira] [Commented] (UIMA-5146) Multiple pipelines need to share just the resources in a ResourceManager

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

Marshall Schor commented on UIMA-5146:
--------------------------------------

I think this could be done using an internal copy constructor and a copy() public method; clone is not recommended (see http://www.artima.com/intv/bloch13.html ).  

The copy would create an instance that shares the fields with some exceptions.
# the mCasManager would be set to null; this will allow a user to either leave it null or set it to share using newInstance.setCasManager(oldInstance.getCasManager())
# the mRelativePathResolver would be a new instance, whose class loader could be independently set.   
# the importCache and importUrlsCache: we will have two varieties of this - one where the user guarantees that the UIMA class loaders / data path are not changing, or not.  If no guarantees, then these would be assigned new (empty) caches, to cover the cases where the references mapped to different entities.

Having this method also will allow the PearWrapper Resource Manager creation implementation no longer need to make use of thread local parameter passing tricks.

> Multiple pipelines need to share just the resources in a ResourceManager
> ------------------------------------------------------------------------
>
>                 Key: UIMA-5146
>                 URL: https://issues.apache.org/jira/browse/UIMA-5146
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Burn Lewis
>            Priority: Minor
>
> If an annotator creates an AE to run an independent pipeline with a different typesystem it can't reuse the RM as the CasManager's merged typesystem cannot be updated.  We should be able to create a child RM that shares the resources (delegates to the parent?) but has a unique CasManager.  The 5-arg RM constructor used for pears can be used but it requires access to maps that are protected in the existing RM.  Perhaps we could add:a method such as: 
> ResourceManager createChild();
> Destoying a child RM should not affect the parent and vice-versa.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)