Integrating BTM with Hibernate
Hibernate can be integrated straight with any JTA transaction manager.
The biggest added value (omitting the fact that you can use Hibernate and two databases) is Hibernate's Current Session context management. You do not have to take care about opening nor closing Session as Hibernate will automatically bind them to the JTA transaction's lifecycle. You just have to make sure JTA transactions are properly started and ended.
Hibernate Session factories
You need to configure exactly one SessionFactory per database.
Labels