[cdi-dev] [JBoss JIRA] (CDI-213) Specify what happens if an observer method does directly initiate, commit or rollback JTA transaction
Jens Schumann (JIRA)
jira-events at lists.jboss.org
Thu Aug 30 02:31:32 EDT 2012
[ https://issues.jboss.org/browse/CDI-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714762#comment-12714762 ]
Jens Schumann commented on CDI-213:
-----------------------------------
As far I can tell we can remove the current non portable statement and refer to the JTA spec instead.
IN_PROGRESS observers are covered by http://java.net/jira/browse/JTA_SPEC-5, BEFORE_COMPLETION/AFTER_COMPLETION observers are covered by http://java.net/jira/browse/JTA_SPEC-6.
How do you refer to a possibly clarified behavior in a future spec? ;)
It looks like JTA_SPEC-5 is on it's way, JTA_SPEC-6 (that I created) shouldn't be to difficult after reading Marina's and Paul's comments on that topic (at least it could be declared non portable).
--------------
Paul Parkison wrote:
I would agree with the general approach/alignment that "CDI should rely on what's already specified for the platform especially for container and bean managed transactions and JTA synchronization callbacks" and that any ambiguous, etc. factors should be addressed in the JTA group/spec.
[...]
The CMT/EJB/CDI @Transactional/TransactionScopeaspect is being covered here: http://java.net/jira/browse/JTA_SPEC-5
I think that may still leave the finer clarification of what is legal in beforeCompletion. The introduction of the TransactionSynchronizationRegistry resulted in elaborating on the specification of Synchronization behavior (and of course beforeCompletion) as so the chapter 5 API ref is a better place to look, but indeed things like the ability to suspend/resume in a beforeCompletion method are not specified (the spec would actually seem to suggest that would not be legal/portable but at the same time I know it is possible, and likely used, in most if not all appservers).
> Specify what happens if an observer method does directly initiate, commit or rollback JTA transaction
> -----------------------------------------------------------------------------------------------------
>
> Key: CDI-213
> URL: https://issues.jboss.org/browse/CDI-213
> Project: CDI Specification Issues
> Issue Type: Clarification
> Components: Events, Java EE integration
> Reporter: Martin Kouba
> Assignee: Pete Muir
> Priority: Minor
> Fix For: 1.1.PRD
>
>
> At the moment, the specification does not really specify what happens if an observer method does directly initiate, commit or rollback JTA transaction.
> See *10.5. Observer notification*: "An observer method may not directly initiate, commit or rollback JTA transactions."
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the cdi-dev
mailing list