Thanks for the explanation. With this change, however, it is not possible anymore to create a customized RootUimaContext with a custom resource manager.
Admittedly, my case (which I didn't explain yet) is a freak case and should probably also be fixed elsewhere... my workaround now is to create an anonymous instance in which I override getResourceManager()... Yet, I would still propose to introduce a constructor which allows to create instances of this class based on pre-existing resource / configuration managers. Cheers, -- Richard On 25.03.2015, at 15:29, Marshall Schor <[email protected]> wrote: > The mResourceManager and mConfigurationManager initialization were changed a > few > releases ago as part of the work to make this area more thread safe, in > support > of multi-threaded read-only access to a shared CAS. > > These variables were made "final", and the comment for RootUimaContext_impl > says > (I hope it's correct :-) ) that making these final causes a memory barrier to > be > inserted for them which in turn makes other access to them "safe" from other > threads without further synchronization. > > The method "initializeRoot" is in a package ending with the word "impl", which > says this is an internal implementation method, not part of the exposed API. > It's public because it is defined in the UimaContextAdmin "interface" and all > interface-style methods need to be public. > > I think this is left-over stuff from that earlier change in the way these two > things were initialized. I think the method and the interface should probably > be updated to remove these two arguments. (But that's low priority...) > > -Marshall > > On 3/24/2015 6:13 PM, Richard Eckart de Castilho wrote: >> Hi all, >> >> I wonder... what is the point of having a method allowing to initialize >> a UimaContext with a resource manager if in fact the code is commented out? >> >> See RootUimaContext_impl >> >> public void initializeRoot(Logger aLogger, ResourceManager aResourceManager, >> ConfigurationManager aConfigurationManager) { >> mLogger = aLogger; >> // mResourceManager = aResourceManager; >> // mConfigurationManager = aConfigurationManager; >> mSession = new Session_impl(); >> } >> >> Cheers, >> >> -- Richard
