[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
Sat Aug 25 02:32:15 EDT 2012
[ https://issues.jboss.org/browse/CDI-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713685#comment-12713685 ]
Jens Schumann commented on CDI-213:
-----------------------------------
Leaving JMS aside I think...
A IN_PROGRESS observer method behaves from TX perspective just like any other synchronous method call, so regular JTA (JavaEE/EJB) semantics apply.
A BEFORE_COMPLETION/AFTER_SUCCESS/AFTER_FAILURE observer method is basically a JTA transaction synchronization callback, so JTA javax.transaction.Synchronization#beforeCompletion and javax.transaction.Synchronization#afterCompletion restrictions apply.
If both is true - which I believe - we should not mark JTA interactions as non portable but "simply" refer to related Java EE specs.
The bad news (from Java EE 6 perspective):
\\- TX semantics for IN_PROGRESS observers are more or less specified in chapter 13 EJB spec (version 3.1).
\\- TX interaction restrictions for JTA Synchronization callbacks are pretty unclear, I would expect that chapter 3.3.2 JTA spec (version 1.1) specifies those restrictions (Maybe they are part of the related X/Open XA spec which I did not check so far). Chapter 13 EJB spec (13.6.2.11 EJB 3.1) contains a few hints for synchronization callbacks.
So "simply" referring isn't quite simple. However almost everything we need is specified somewhere, but in the wrong place or a bit incomplete (but well defined).
> 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: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the cdi-dev
mailing list