[
https://issues.jboss.org/browse/WFLY-2936?page=com.atlassian.jira.plugin....
]
Eduardo Martins commented on WFLY-2936:
---------------------------------------
IMHO we should follow the spec, still:
1) The spec defines exceptions when accessing the UserTransaction, for instance WFLY-2698
fixed it for EE Concurrency Utilities (JSR 236), where a task submitted by a CMT EJB may
access the UserTransaction. We need to understand is if there are more exceptions to the
rule, and if that's the case implement these. With respect to this issue, if CDI
defines an exception, then we should fix it.
2) There are other kind of issues around this matter, where specific frameworks try to
access the UserTransaction to do something internally, e.g. WFLY-1168. My opinion on these
is that the issues are on the 3rd party frameworks, and should be fixed *there*, not in
WildFly. Please note that there are alternatives provided by the Java EE spec, for
instance the TransactionSynchronizationRegistry has functionality which may replace the
usage of UserTransaction most of the cases.
3) But there may be *valid* exceptions to 2) also. I'm not familiar with that Seam API
but suppose this is a popular feature that a lot of users depend, and there is not
alternative provided by the Java EE spec. In such case I believe what could be done is a
new API exposed by WildFly, which would allow 3rd party code to disable/enable temporarly
the standard behaviour, allowing access to the UserTransaction.
Let's find out what is the use case here, that's why I'm almost begging for
something that I can use to replicate the issue, and obviously look into what's
happening behind the scenes.
"Only session and message-driven beans with bean-managed
transaction demarcation are allowed to access UserTransaction" error in migrated seam
2.2.2 application
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: WFLY-2936
URL:
https://issues.jboss.org/browse/WFLY-2936
Project: WildFly
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Affects Versions: 8.0.0.Final
Environment: Windows 7 64bit
Java 1.7.0_51
WildFly 8.0.0.Final
JBoss Seam 2.2.2.Final
Reporter: Dimitris Keramidas
Assignee: Eduardo Martins
Attachments: Auth.java, Authenticator.java, components.xml,
jboss-deployment-structure.xml, server.log
The error is fired when attempting to call a transaction-enabled EJB method, from a seam
component. Specifically the authentication component.
In order to get to this position, the project's deployment descriptors had to be
migrated. Furthermore, mojarra version 1.2_15 was deployed to WildFly, as described by
this link:
https://community.jboss.org/wiki/DesignOfWildFlyMulti-JSFFeature
Please see attached logs and descriptors.
--
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