• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can i integrates jta with hibernate?

 
Kobe Luo
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • 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.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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?
 
Hung Tang
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic