merge fix from 2/17/17
@@ -193,10 +193,10 @@ public abstract class Resource_ImplBase implements Resource {
.getResourceManagerConfiguration();
if (resMgrCfg != null) {
UimaContext prevContext = UimaContextHolder.setContext(mUimaContextAdmin);
+ try {
try {
resMgrCfg.resolveImports(getResourceManager());
} catch (InvalidXMLException e) {
- UimaContextHolder.setContext(prevContext);
throw new ResourceInitializationException(e);
}
if (aAdditionalParams == null) {
@@ -221,9 +221,10 @@ public abstract class Resource_ImplBase implements Resource {
mUimaContextAdmin.getResourceManager().initializeExternalResources(resMgrCfg,
mUimaContextAdmin.getQualifiedContextName(), aAdditionalParmsForExtResources);
-
+ } finally {
UimaContextHolder.setContext(prevContext);
}
+ }
// resolve and validate this component's external resource dependencies
ExternalResourceDependency[] resourceDependencies = ((ResourceCreationSpecifier) aSpecifier)
