tags:

views:

407

answers:

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?

+1  A: 

This is answered here: http://docs.codehaus.org/display/BTM/Hibernate13#Hibernate13-Transactionmanagerlookupclass

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: http://docs.codehaus.org/display/BTM/Tomcat13

Ludovic Orban