+1, not defined is good IMO since it stays align on java. Nothing
prevents giving an event holding a lock which is good IMO since it
allows to use any pattern you want. @Asynch also doesn't always mean
concurrent which is yet another case.
Romain Manni-Bucau
@rmannibucau
2014-12-16 19:37 GMT+01:00 Jens Schumann <jens.schumann(a)openknowledge.de>:
Same here. For instance we use mutable events to collect data.
Just checked EJB 3.1 spec @Asynchronous regarding parameter immutability: As
far I can tell it's not defined either.
Jens
On 16 Dec 2014, at 19:22, Thorben Janssen <thjanssen123(a)gmail.com> wrote:
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.
We shouldn't break these apps, if we can solve it in a different way.
--
Thorben Janssen
@thjanssen123
www.thoughts-on-java.org
2014-12-16 18:46 GMT+01:00 Romain Manni-Bucau <rmannibucau(a)gmail.com>:
>
> Hi Antoine,
>
> why isn't it portable?
>
>
> Romain Manni-Bucau
> @rmannibucau
>
http://www.tomitribe.com
>
http://rmannibucau.wordpress.com
>
https://github.com/rmannibucau
>
>
> 2014-12-16 18:39 GMT+01:00 Pete Muir <pmuir(a)redhat.com>:
> > I don’t think it’s specified. As objects are, by default in Java,
> > mutable, I
> > would assume that payloads are implicitly mutable.
> >
> > On 16 Dec 2014, at 16:31, Antoine Sabot-Durand
> > <antoine(a)sabot-durand.net>
> > wrote:
> >
> > 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) 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.
> >
> > Antoine
> > _______________________________________________
> > cdi-dev mailing list
> > cdi-dev(a)lists.jboss.org
> >
https://lists.jboss.org/mailman/listinfo/cdi-dev
> >
> > Note that for all code provided on this list, the provider licenses the
> > code
> > under the Apache License, Version 2
> > (
http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
> > provided on this list, the provider waives all patent and other
> > intellectual
> > property rights inherent in such information.
> >
> >
> >
> > _______________________________________________
> > cdi-dev mailing list
> > cdi-dev(a)lists.jboss.org
> >
https://lists.jboss.org/mailman/listinfo/cdi-dev
> >
> > Note that for all code provided on this list, the provider licenses the
> > code
> > under the Apache License, Version 2
> > (
http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
> > provided on this list, the provider waives all patent and other
> > intellectual
> > property rights inherent in such information.
>
> _______________________________________________
> cdi-dev mailing list
> cdi-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/cdi-dev
>
> Note that for all code provided on this list, the provider licenses the
> code under the Apache License, Version 2
> (
http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
> provided on this list, the provider waives all patent and other intellectual
> property rights inherent in such information.
_______________________________________________
cdi-dev mailing list
cdi-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/cdi-dev
Note that for all code provided on this list, the provider licenses the code
under the Apache License, Version 2
(
http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
provided on this list, the provider waives all patent and other intellectual
property rights inherent in such information.
_______________________________________________
cdi-dev mailing list
cdi-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/cdi-dev
Note that for all code provided on this list, the provider licenses the code
under the Apache License, Version 2
(
http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
provided on this list, the provider waives all patent and other intellectual
property rights inherent in such information.