INT-3416 Reset SMS.copyOnGet By Default

JIRA: https://jira.spring.io/browse/INT-3416

Add caution to docs about users getting a hard
reference to the group instead of a copy.
This commit is contained in:
Gary Russell
2014-06-17 14:10:02 -04:00
committed by Artem Bilan
parent 1df6d872fa
commit 117669fb9a
4 changed files with 32 additions and 3 deletions

View File

@@ -107,4 +107,22 @@
</itemizedlist>
</para>
<caution id="sms-caution">
<title>Caution with SimpleMessageStore</title>
<para>
Starting with <emphasis>version 4.1</emphasis>, the <classname>SimpleMessageStore</classname> no longer copies
the message group when calling <code>getMessageGroup()</code>. For large message groups, this was a significant
performance problem. 4.0.1 introduced a boolean <code>copyOnGet</code> allowing this to be controlled. When
used internally by the aggregator, this was set to false to improve performance. It is now false by default.
</para>
<para>
Users accessing the group store outside of components such as aggregators, will now get a direct reference
to the group being used by the aggregator, instead of a copy. Manipulation of the group outside of the aggregator may
cause unpredictable results.
</para>
<para>
For this reason, users should not perform such manipulation, or set the <code>copyOnGet</code>
property to <code>true</code>.
</para>
</caution>
</section>

View File

@@ -11,7 +11,7 @@
</para>
<section id="4.1-general">
<title>General Changes</title>
<section>
<section id="4.1-amqp-outbound-lazy-connect">
<title>AMQP Outbound Endpoints</title>
<para>
The AMQP outbound endpoints support a new property <code>lazy-connect</code>
@@ -22,5 +22,13 @@
See <xref linkend="amqp"/> for more information.
</para>
</section>
<section id="4.1-sms-copy-on-get">
<title>SimpleMessageStore</title>
<para>
The <classname>SimpleMessageStore</classname> no longer makes a copy of the group
when calling <code>getMessageGroup()</code>.
See <xref linkend="sms-caution"/> for more information.
</para>
</section>
</section>
</chapter>