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] [Commented] (UIMA-5146) Multiple pipelines need to share just the resources in a ResourceManager
Date Wed, 19 Oct 2016 14:58:59 GMT

    [ 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
# 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
> ResourceManager createChild();
> Destoying a child RM should not affect the parent and vice-versa.

This message was sent by Atlassian JIRA

View raw message