When us­ing Tom­cat and dis­trib­uted trans­ac­tions, there are 2 pit­falls to be aware of:

PITFALL 1: thread pool­ing:

A com­mon pit­fall con­cerns tom­cat thread pool and pend­ing trans­ac­tions: Tom­cat has a thread-pool­ing and thread-reuse fea­ture that reuses threads for lat­er HTTP re­quests. If you don't make sure to ter­mi­nate trans­ac­tions then some trans­ac­tions will be reused for a lat­er HTTP re­quest - not some­thing you would want.

To avoid this, make sure to not leave pend­ing trans­ac­tions af­ter failed re­quests. Our pro­fes­sion­al sub­scrip­tion in­cludes a fil­ter that takes care of this for you - con­tact us if you would like that set­up.

PITFALL 2: serv­er-lev­el in­stal­la­tions:

By de­fault, avoid Atomikos jars and jta.prop­er­ties at the serv­er's lib lev­el since you will get into con­flicts if you have more than one web ap­pli­ca­tion that needs trans­ac­tions.

You can avoid this by keep­ing the Atomikos jars in the class loader scope of each in­di­vid­ual web app.

Al­ter­na­tive­ly: cus­tomers of our pro­fes­sion­al sub­scrip­tion have ac­cess to our Tom­cat in­te­gra­tion mod­ule that con­fig­ures Atomikos as the serv­er-lev­el JTA in­clud­ing JNDI bind­ings - con­tact us if you would like that set­up.
RSS

Comments

Add a comment

Corporate Information

Atomikos Corporate Headquarters
Hoveniersstraat, 39/1, 2800
Mechelen, Belgium

Contact Us

Copyright 2026 Atomikos BVBA | Our Privacy Policy
By using this site you agree to our cookies. More info. That's Fine