Question

Trying to wrap my head around JTA and have arbitrarily chosen Bitronix as the impl because the documentation was easier to get to (as opposed to Atmikos which makes you sign-up and register in order to get at the src/docs/jars/etc.).

If I want to use Bitronix to be my JTA implementation (using Tomcat & GlassFish), then what is its basic architecture (which may just be the basic architecture of JTA itself)? Is a transaction manager an actual server/runtime that I connect to (like a JMS broker)? Or is this just an API that I can configure and hit whenever I need a transaction?

My understanding of JTA is that there is:

  • Your code
  • A resource manager - adaptor for some ACID-compliant persistence (like a datastore or message broker)
  • A transaction manager - manages transaction API calls between your code and the resource manager

Is Bitronix just the transaction manager and if so is it a separate application, a separate JAR/WAR that has to be deployed alongside yours, or does it run "embedded" inside your app? Thanks in advance!

Was it helpful?

Solution

It runs embedded inside Tomcat, and is accessible through JNDI, like all other JTA transaction managers. The whole process of embedding Bitronix with Tomcat is described here.

Note that there is no reason to use Bitronix with Glassfish, since Glassfish is a full-stack Java EE app server and thus already has a JTA transaction manager.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top