This reverts commit 93bc7030e2.
This commit is contained in:
Christopher L. Shannon (cshannon) 2016-04-15 13:05:06 +00:00
parent cb6c7fb423
commit 4a3fa320e7
1 changed files with 0 additions and 8 deletions

View File

@ -55,12 +55,6 @@ public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage
} }
private void copy(ActiveMQTextMessage copy) { private void copy(ActiveMQTextMessage copy) {
//AMQ-6218 - Save text before calling super.copy() to prevent a race condition when
//concurrent store and dispatch is enabled in KahaDB
//The issue is sometimes beforeMarshall() gets called in between the time content and
//text are copied to the new object leading to both fields being null when text should
//not be null
String text = this.text;
super.copy(copy); super.copy(copy);
copy.text = text; copy.text = text;
} }
@ -85,11 +79,9 @@ public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage
@Override @Override
public String getText() throws JMSException { public String getText() throws JMSException {
ByteSequence content = getContent(); ByteSequence content = getContent();
String text = this.text;
if (text == null && content != null) { if (text == null && content != null) {
text = decodeContent(content); text = decodeContent(content);
this.text = text;
setContent(null); setContent(null);
setCompressed(false); setCompressed(false);
} }