geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Bartel <j...@mortbay.com>
Subject Re: UserTransaction in a web application
Date Mon, 12 Apr 2004 17:08:58 GMT
Dain,

> I have changed the WarConfigBuilder and JettyWebApplicationContext to 
> setup and initialize the UserTransaction.  In geronimo we can enable and 
> disable the user transaction on a per thread basis.  This feature is 
> required for EJBs and the EJB spec has a well defined set of rules for 
> when the methods on a UserTransaction can be called.  Does anyone know 
> the rules for when the UserTransaction should be valid in a Web 
> application?  (If you can please give reference to the spec sections 
> that apply)

The J2EE 1.4 spec mentions specific rules for UserTransactions in 
webapps in section 4.2.1.


> In the mean time, I am enabling the UserTransaction on entry to the web 
> application and disabling it on the way out.  I think this is an issue 
> for threads created by the web application, but I'm not sure.

According to the spec, threads created by the webapp should not have an 
existing transaction context associated with them. There are, however, a 
couple of other requirements we need to look at, eg throwing an 
exception if there is an uncompleted transaction when the service() 
method of a servlet exists.


Jan



Mime
View raw message