• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

resouce-local and JPA transactions

 
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone explain to me what is the difference between a resource_local transaction and a JPA transaction?

Thanks in advance
 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you asking about EJB2.0 or EJB3.0?
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

With JPA you can speciy two types of transactions :

1- RESSOUCE_LOCAL : available in and outside a JEE environment, and rely on the underline Data Source you use. For example you can use this type to work with database transaction.

2- JTA : for Java Transaction API it's only available in a JEE environment. This kind of transaction is more rich than the first one. You can have a transaction with different Data Source for different types. For example between a database and LDAP.

When you are in a JEE environment, the JTA is the default value. However, RESSOUCE_LOCAL is the defaut value in a SE environment.

I hope this help.
 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.
Short and help explanation.
 
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just to add, you would have to use EntityTransaction API with RESOURCE_LOCAL transactions and the related entity manager would be a resource local entity manager.
 
Drove my Chevy to the levee but the levee was dry. A wrung this tiny ad and it was still dry.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic