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

Marshall Schor commented on UIMA-5043:
--------------------------------------

I think this Jira is all about providing convenient access to the external 
configuration settings directly (without the indirection normally done via a 
components external override names).  A secondary issue is this global / vs 
make-use-of-the UIMA context issue, when doing this.  Addressing the 2nd issue, 
a low-level component (for example, a POJO called by some UIMA annotator) would 
need to be modified to access the UIMA external configuration parameters, and 
if it needed the "Uima Context" (to avoid global references), that would need 
to be "passed in".  This, in turn, could cascade into a requirement for the 
calling chain to pass along this UIMA context, from a place where it was known.

Java provides a way to avoid all that extra parameter passing - using 
ThreadLocal.  The UIMA framework could maintain a ThreadLocal value for the 
Uima Context, and that could be (even automatically, under the covers) accessed 
by the new API for getting to the external settings info.

There's also a version of ThreadLocal, called InheritedThreadLocal, which is 
automatically inherited by child threads, which could be used to support the 
case where a low level component created child threads of its own.

I think with an approach like this, there would never be a need for a "global" 
API to access external configuration settings?

> Provide method to access individual external override settings
> --------------------------------------------------------------
>
>                 Key: UIMA-5043
>                 URL: https://issues.apache.org/jira/browse/UIMA-5043
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Burn Lewis
>            Assignee: Burn Lewis
>            Priority: Minor
>             Fix For: 2.9.0SDK
>
>
> The framework loads the external override settings and uses them in any 
> configuration parameter that has an external override name attached,  Users 
> have asked for the ability to access these values directly without the 
> indirection of configuration parameter entries in descriptors.  Currently the 
> complete Settings object that holds all the external override settings loaded 
> by the framework is accessible via UimaContextAdmin.
> An improvement would be to allow individual values to be read using a method 
> in the UimaContext interface, perhaps: 
> String getExternalOverride(String name)
> String[] getExternalOverrideArray{String name)



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

Reply via email to