Luis Colorado (1) [Avatar] Offline
#1
In the HelloWorld.java 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
HallsGapGuy (1) [Avatar] Offline
#2
I've hit this same stopper, wasted too much time on it and I still can't find how to solve it. The authors should be starting out with a "simple" example that works, not some weird and wonderful extension that "is outside the scope of this book". A ridiculous and idiotic way to start a book!