Search code examples
springtomcattransactionsjta

jta with spring in web application


If I follow spring and bitronix instructions and I run web application on tomcat, do I still need to configure:

  1. in web.xml the resource-ref
  2. in context.xml the resrouce and transaction tag
  3. in web.xml the bitronix.tm.integration.tomcat55.BTMLifecycleListener
  4. in resource.properies the Data resource?

I prefer to configure the bitronix (btm) only in spring and not in tomcat. is it possible in web application?


Solution

  • Transactions ought to be associated with the service tier, which does not depend at all on the web tier. (The web tier, however, does use the service tier to fulfill requests.)

    If that's the case, there shouldn't be a reason to embed information about transactions in any configuration except Spring's.