Author: schor
Date: Fri Apr  4 13:42:57 2014
New Revision: 1584682

URL: http://svn.apache.org/r1584682
Log:
[UIMA-3693][UIMA-3694]

Modified:
    
uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/analysis_engine/impl/PearAnalysisEngineWrapper.java

Modified: 
uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/analysis_engine/impl/PearAnalysisEngineWrapper.java
URL: 
http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/analysis_engine/impl/PearAnalysisEngineWrapper.java?rev=1584682&r1=1584681&r2=1584682&view=diff
==============================================================================
--- 
uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/analysis_engine/impl/PearAnalysisEngineWrapper.java
 (original)
+++ 
uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/analysis_engine/impl/PearAnalysisEngineWrapper.java
 Fri Apr  4 13:42:57 2014
@@ -47,6 +47,7 @@ import org.apache.uima.resource.Resource
 import org.apache.uima.resource.ResourceManagerPearWrapper;
 import org.apache.uima.resource.ResourceProcessException;
 import org.apache.uima.resource.ResourceSpecifier;
+import org.apache.uima.resource.impl.ResourceManager_impl;
 import org.apache.uima.resource.metadata.ProcessingResourceMetaData;
 import org.apache.uima.resource.metadata.ResourceMetaData;
 import org.apache.uima.util.InvalidXMLException;
@@ -101,6 +102,7 @@ public class PearAnalysisEngineWrapper e
       return result;
    }
 
+   public static final ThreadLocal<ResourceManager_impl> newPearsParent = new 
ThreadLocal<ResourceManager_impl>();
    private synchronized ResourceManager createRM(StringPair sp, PackageBrowser 
pkgBrowser, ResourceManager parentResourceManager)
          throws MalformedURLException {
       // create UIMA resource manager and apply pear settings
@@ -110,8 +112,10 @@ public class PearAnalysisEngineWrapper e
        // could be null for top level Pear not in an aggregate
        rsrcMgr = UIMAFramework.newDefaultResourceManager();
      } else {
+       newPearsParent.set((ResourceManager_impl) parentResourceManager);
        rsrcMgr = UIMAFramework.newDefaultResourceManagerPearWrapper();
-       
((ResourceManagerPearWrapper)rsrcMgr).initializeFromParentResourceManager(parentResourceManager);
+       newPearsParent.remove();
+//       
((ResourceManagerPearWrapper)rsrcMgr).initializeFromParentResourceManager(parentResourceManager);
      }
      rsrcMgr.setExtensionClassPath(sp.classPath, true);
      UIMAFramework.getLogger(this.getClass()).logrb(


Reply via email to