[wildfly-dev] Issues accessing UserTransaction in WildFly

Jason Greene jason.greene at redhat.com
Tue Feb 25 14:27:03 EST 2014


On Feb 25, 2014, at 8:41 AM, Scott Marlow <smarlow at redhat.com> wrote:

> On 02/25/2014 07:13 AM, Eduardo Martins wrote:
>> That’s wrt invoking EJBContext#getUserTransaction() only, but your first quote section has an additional paragraph:
>> 
>> "The enterprise bean’s business methods, message listener methods, business method interceptor meth- ods, lifecycle callback interceptor methods, or timeout callback methods must not attempt to obtain or use the javax.transaction.UserTransaction interface.”
>> 
>> The rule is too restrictive in my opinion, there is no harm in obtaining the UserTransaction I think, the restriction should be in using some of it’s methods, the same way restrictions are applied to the methods of the java.sql.ConnectionIt’s listed in your first quote.
>> 
>> Anyway, the spec is what it is, I don’t think Seam should try to change it. If there is enough utility in transaction control by Seam then it should clearly define how it integrates with Java EE. If there isn’t, if it’s just a matter of getting some status from transaction control, then alternatives should be used, such as the TSR. Well, Seam could also give some “room” to the app, and use the TSR for any status retrieval, leaving the usage of the Java EE UserTransaction for managing Seam's transaction, somehow IMHO “fixing" the spec.
> 
> Looking at the (second) exception call stack in https://issues.jboss.org/secure/attachment/12380521/server.log that shows the Seam related issue in WFLY-2936.  I don't understand how Seam was able to get the UT in the previous releases that also threw the same ISE error (when the UT is accessed from a CMT).
> 
> I have a question about Seam and prior releases of the app server that didn't have this problem.  Did something change in Seam or is it that we just don't reach the org.jboss.seam.transaction.Transaction.getUserTransaction() for some reason, with previous releases of the app server?
> 

Right the real question is what is Seam using the UT for. There is only one method on that is “safe” with CMT (getting the status), and that isn’t all that useful.

--
Jason T. Greene
WildFly Lead / JBoss EAP Platform Architect
JBoss, a division of Red Hat




More information about the wildfly-dev mailing list