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

Marshall Schor commented on UIMA-1250:
--------------------------------------

It's not clear to me what the correct operation should be.  As far as I can 
see, this issue concerns what "class" the logger is associated with, only.  The 
framework takes steps to insure when calling user code that the logger class 
corresponds to the user code.  But for framework operations, this is not 
specified, I think.

What's happening in this case is that the AggregateAnalysisEngine_impl class is 
a subclass of Resource_ImplBase, and calls its {{initialize}} method via 
{{super.initialize}}.  The {{Resource_ImplBase initialize}} code sets the 
logger in the current context to the class of the object, in this case, the 
{{AggregateAnalysisEngine_impl}}.  But later, the 
{{AggregateAnalysisEngine_impl's initialize}} method makes an instance of 
{{ASB_impl}} and calls its {{initialize}} method.  Now, {{ASB_impl}} is also a 
subclass of {{Resource_ImplBase}}, and its {{initialize}} method is called, 
which switches the logger class to {{ASB_impl}}.

It's not clear to me why the {{ASB_impl}} is a subclass of 
{{Resource_ImplBase}}.  I think a good fix may be to change {{ASB_impl}} so it 
is no longer a subclass of {{Resource_ImplBase}}.  I'll also investigate the 
pros/cons of even getting rid of {{ASB_impl}} as a separate object.

> Some initialization messages may not appear as the Logger object changes 
> during initialization
> ----------------------------------------------------------------------------------------------
>
>                 Key: UIMA-1250
>                 URL: https://issues.apache.org/jira/browse/UIMA-1250
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.2.2
>            Reporter: Burn Lewis
>            Priority: Minor
>
> In the initialize method in AggregateAnalysisEngine_impl the logger object 
> returned by the local getLogger() method changes ... for the init_begin msg 
> it is correct, but after initASB has been called when the init_successful msg 
> is logged the logger object is the one for the ASB_impl class.  All 3 
> implementations of AnalysisEngine use the getLogger() method in 
> Resource_ImplBase which gets it from its local UimaContext ... but this is 
> changed during initialization.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to