1

Looks like Bitronix, as suggested elsewhere, works very well. However, I'm stumped by a problem with it. I get this exception from Hibernate, when I attempt to save the session after I call TransactionManager.begin():

14:21:32,350 ERROR [JTATransaction] Could not find UserTransaction in JNDI
javax.naming.NameNotFoundException: Name UserTransaction is not bound in this Context
    at org.apache.naming.NamingContext.lookup(NamingContext.java:769)

I can't see any evidence that Bitronix binds the user transaction to JNDI. How do I make it do that?

Chris Aldrich
  • 1,904
  • 1
  • 22
  • 37
Chris R
  • 17,546
  • 23
  • 105
  • 172

1 Answers1

3

This is answered here: https://github.com/bitronix/btm/blob/master/btm-docs/src/main/asciidoc/Hibernate2x.adoc#txManager

In a nutshell, there is no way for BTM to automatically bind itself to Tomcat's JNDI server unless you change the Tomcat config yourself. This is explained here: https://github.com/bitronix/btm/blob/master/btm-docs/src/main/asciidoc/TomcatWithBtm2x.adoc

Ludovic Orban
  • 396
  • 1
  • 6