Rupert Westenthaler created STANBOL-903:
-------------------------------------------

             Summary: NLPEngineHelper does not obtain wirte lock when creating 
an AnalyzedText ContentPart in the initAnalyzedText utility method
                 Key: STANBOL-903
                 URL: https://issues.apache.org/jira/browse/STANBOL-903
             Project: Stanbol
          Issue Type: Bug
          Components: Enhancer
            Reporter: Rupert Westenthaler
            Assignee: Rupert Westenthaler
            Priority: Minor


As the title says the #initAnalyzedText(ContentItem ci) method in the 
NlpEngineHelper utility (o.a.s.enhancer.nlp module) does not use a write lock 
when creating the content part.

Using a read lock for checking if the AnalysedText content part exists is fine, 
but it is not yet created a write lock needs to be obtained to avoid creating 
multiple AnalysedText content parts.

Users affected by this will notice IllegalStateExceptions with the message that 
the AnalyzedText content part is already present. Also check that the 
"NlpEngineHelper#initAnalysedText(...)" is mentioned in the Stacktrace as this 
Exception may also originate from direct calls to 
AnalysedTextFactory#createAnalysedText(..)"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to