• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how can i integrates jta with hibernate?

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my question is as the title said, i can't find some details about jta in hibernate. On the assumption that i use the jboss transaction as a jta provider, how can i deal with it? And i also didn't find any useful information in the jboss transaction reference.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your domain objects are deployed in the AS and there is a JTA Transaction in progress, then when you call session.beginTransaction() it will join the JTA transaction automatically for you, nothing to do or see here. If there is not a JTA Transaction in progress when you call session.beginTransaction(), then Hibernate creates its own internal transaction.

Basically, it is hidden from you so you don't have to worry about it.

Mark
 
Kobe Luo
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i want to try jta, and i don't want to use the hibernate internal transaction,
how can i use jboss transaction or other?
 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mark Spritzler:
If your domain objects are deployed in the AS and there is a JTA Transaction in progress, then when you call session.beginTransaction() it will join the JTA transaction automatically for you, nothing to do or see here. If there is not a JTA Transaction in progress when you call session.beginTransaction(), then Hibernate creates its own internal transaction.

Basically, it is hidden from you so you don't have to worry about it.

Mark


Hibernate uses JDBC Transaction when you don't specify hibernate.transaction.factory_class property.

For Hibernate to participate in JTA, you'll need to update hibernate.transaction.factory_class and hibernate.transaction.manager_lookup_class to the appropriate values.
 
Eat that pie! EAT IT! Now read this tiny ad. READ IT!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic