In the example, there's a static TM#getUserTransaction() method call
UserTransaction tx = TM.getUserTransaction();
that you use to get the transaction for the current thread, without declaring the TM anywhere.

You mention later that the trick is to use Bitronix transaction manager library. I have downloaded it, but no reference to TM class appears anywhere. Is that a placeholder for some actual class? If so, please, clarify. I've used always Hibernate through JBoss application server and now I'm using it alone, but the need to link to Bitronix library makes it impossible to guess what is that TM object you use without declaring. After browsing the code examples, I see it again there, and cannot solve the problem of getting it to work. What should I replace that with?

Thanks in advance,

Luis Colorado