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
