From dev-return-35818-apmail-uima-dev-archive=uima.apache.org@uima.apache.org Tue Oct 25 21:28:59 2016 Return-Path: X-Original-To: apmail-uima-dev-archive@www.apache.org Delivered-To: apmail-uima-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4285619D86 for ; Tue, 25 Oct 2016 21:28:59 +0000 (UTC) Received: (qmail 6097 invoked by uid 500); 25 Oct 2016 21:28:59 -0000 Delivered-To: apmail-uima-dev-archive@uima.apache.org Received: (qmail 6050 invoked by uid 500); 25 Oct 2016 21:28:58 -0000 Mailing-List: contact dev-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@uima.apache.org Delivered-To: mailing list dev@uima.apache.org Received: (qmail 6029 invoked by uid 99); 25 Oct 2016 21:28:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2016 21:28:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 686322C1F54 for ; Tue, 25 Oct 2016 21:28:58 +0000 (UTC) Date: Tue, 25 Oct 2016 21:28:58 +0000 (UTC) From: "Marshall Schor (JIRA)" To: dev@uima.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (UIMA-5153) maybe change subclasses of Resource_impl to call super methods MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/UIMA-5153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15606535#comment-15606535 ] Marshall Schor commented on UIMA-5153: -------------------------------------- The external resources that extend Resource_ImplBase were not calling super.initialize(...). The super method was designed with the non-external resource initialization in mind, in that it creates a UIMA Context (corresponding to a aggregate hierarchy level). I think the thought for external resources was that they don't really belong to a particular UIMA Context because they're shared. Yet, a UIMA Context object is the way the external resource would get access to the Resource Manager. I changed the impl of the 3 classes that currently implement kinds of external resources: * ConfigurableDataResource_impl * DataResource_impl * FileLanguageResource_impl So that they now call super.initialize(...). I changed the shared impl of initialize in Resource_implBase to skip the part where it sets up a new UIMA context. And I changed the call in Resource_impleBase for the part where it's configuring the external resources to pass along both the resource manager and the UIMA Context (which has a ref to the resource manager) (probably only need the 2nd). So the external Resources should now have access to the UIMA Context in which they were defined (the first one, in case of multiple definitions). > maybe change subclasses of Resource_impl to call super methods > -------------------------------------------------------------- > > Key: UIMA-5153 > URL: https://issues.apache.org/jira/browse/UIMA-5153 > Project: UIMA > Issue Type: Improvement > Components: Core Java Framework > Reporter: Marshall Schor > Priority: Minor > > Richard pointed out (3 years ago) that the subclass of Resource_impl, ConfigurableDataResource_impl's initialize method doesn't call super.initialize(), so its mUimaContextAdmin is never initialized, hence any getResourceManager() call returns null. > Investigate this and other subclasses of Reousrce_impl to see if super methods should be called. > Investigate if other methods also need a super call -- This message was sent by Atlassian JIRA (v6.3.4#6332)