[cdi-dev] CDI + transactions query
pmuir at bleepbleep.org.uk
Wed Aug 22 08:20:52 EDT 2012
Hi Paul, Tom, Mike,
I have an open issue in CDI - https://issues.jboss.org/browse/CDI-213 - which I would like your input on.
Events in CDI are very simple (you can read more at http://docs.jboss.org/weld/reference/latest/en-US/html/events.html) and provide a typesafe implementation of the observer/observable pattern. Currently the spec prohibits manipulating transactions from an observer method, but it doesn't say what happens if someone does try to do this .
So, what I'm asking is really whether it really makes no sense to allow this, or whether it's best to say that it's "non-portable", which means that an implemenation might offer this as a feature above and beyond the spec. Furthermore, it may be that it's not really possible to disallow this, in which case we would need to go with non-portable as well.
 If we say that it leads to an exception, we can then check it in the TCK, which is good :-)
More information about the cdi-dev