[cdi-dev] Is the concept of mutable event payload specified

Antoine Sabot-Durand antoine at sabot-durand.net
Tue Dec 16 11:31:32 EST 2014

Hi guys,

Always working on Async event concept and discussion around mutable payloads. I was looking where in the spec we specified the fact that fired payload are mutable. I red-read chapter 10  (http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#events <http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#events>) twice and didn’t found. I also browsed JIRA and TCK to find any ref to this feature and found nothing. On the other hand it is not specified that payload should be immutable ;)

I’d be happy if some of you could have a look and see if I missed something.

If I’m not wrong, the mutable payload we (including myself) advertise in CDI is a non portable feature (I’m the firs surprised here). So I propose that :

1) We decide to write something in the specification about allowing or forbidding it (I know some people not happy with this mix between observer and visitor pattern)
1bis) Should we decide to forbid it by default, we should provide an alternative mode to allow people using this unspecified feature
2) Forbid it for fireAsync()

Thanks for your feedback and your correction if I missed the feature in the spec.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20141216/6aef8552/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.jboss.org/pipermail/cdi-dev/attachments/20141216/6aef8552/attachment.bin 

More information about the cdi-dev mailing list