<div dir="ltr">We should be careful with making the payload imutable. I know of several applications (and companies) that change the payload to send some information back to to the event producer.<div>We shouldn&#39;t break these apps, if we can solve it in a different way.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>--</div><div><b>Thorben Janssen</b><br></div><div><br></div><div><a href="https://twitter.com/thjanssen123" target="_blank">@thjanssen123</a><br></div><a href="http://www.thoughts-on-java.org" target="_blank">www.thoughts-on-java.org</a> <br></div></div></div>
<br><div class="gmail_quote">2014-12-16 18:46 GMT+01:00 Romain Manni-Bucau <span dir="ltr">&lt;<a href="mailto:rmannibucau@gmail.com" target="_blank">rmannibucau@gmail.com</a>&gt;</span>:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Antoine,<br>
<br>
why isn&#39;t it portable?<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Romain Manni-Bucau<br>
@rmannibucau<br>
<a href="http://www.tomitribe.com" target="_blank">http://www.tomitribe.com</a><br>
<a href="http://rmannibucau.wordpress.com" target="_blank">http://rmannibucau.wordpress.com</a><br>
<a href="https://github.com/rmannibucau" target="_blank">https://github.com/rmannibucau</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
2014-12-16 18:39 GMT+01:00 Pete Muir &lt;<a href="mailto:pmuir@redhat.com">pmuir@redhat.com</a>&gt;:<br>
&gt; I don’t think it’s specified. As objects are, by default in Java, mutable, I<br>
&gt; would assume that payloads are implicitly mutable.<br>
&gt;<br>
&gt; On 16 Dec 2014, at 16:31, Antoine Sabot-Durand &lt;<a href="mailto:antoine@sabot-durand.net">antoine@sabot-durand.net</a>&gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt; Hi guys,<br>
&gt;<br>
&gt;<br>
&gt; Always working on Async event concept and discussion around mutable<br>
&gt; payloads. I was looking where in the spec we specified the fact that fired<br>
&gt; payload are mutable. I red-read chapter 10<br>
&gt; (<a href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#events" target="_blank">http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#events</a>) twice and didn’t<br>
&gt; found. I also browsed JIRA and TCK to find any ref to this feature and found<br>
&gt; nothing. On the other hand it is not specified that payload should be<br>
&gt; immutable ;)<br>
&gt;<br>
&gt; I’d be happy if some of you could have a look and see if I missed something.<br>
&gt;<br>
&gt; If I’m not wrong, the mutable payload we (including myself) advertise in CDI<br>
&gt; is a non portable feature (I’m the firs surprised here). So I propose that :<br>
&gt;<br>
&gt; 1) We decide to write something in the specification about allowing or<br>
&gt; forbidding it (I know some people not happy with this mix between observer<br>
&gt; and visitor pattern)<br>
&gt; 1bis) Should we decide to forbid it by default, we should provide an<br>
&gt; alternative mode to allow people using this unspecified feature<br>
&gt; 2) Forbid it for fireAsync()<br>
&gt;<br>
&gt;<br>
&gt; Thanks for your feedback and your correction if I missed the feature in the<br>
&gt; spec.<br>
&gt;<br>
&gt; Antoine<br>
&gt; _______________________________________________<br>
&gt; cdi-dev mailing list<br>
&gt; <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt;<br>
&gt; Note that for all code provided on this list, the provider licenses the code<br>
&gt; under the Apache License, Version 2<br>
&gt; (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas<br>
&gt; provided on this list, the provider waives all patent and other intellectual<br>
&gt; property rights inherent in such information.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; cdi-dev mailing list<br>
&gt; <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt;<br>
&gt; Note that for all code provided on this list, the provider licenses the code<br>
&gt; under the Apache License, Version 2<br>
&gt; (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas<br>
&gt; provided on this list, the provider waives all patent and other intellectual<br>
&gt; property rights inherent in such information.<br>
<br>
_______________________________________________<br>
cdi-dev mailing list<br>
<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
<br>
Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.</div></div></blockquote></div></div>