Questions tagged [jta]

Java Transaction API (JTA) specifies standard Java interfaces between a transaction manager and the parties involved in a distributed transaction system: the resource manager, the application server, and the transactional applications.

JTA specifies standard Java interfaces between a transaction manager and the parties involved in a distributed transaction system: the resource manager, the application server, and the transactional applications.

1131 questions
242
votes
4 answers

javax.transaction.Transactional vs org.springframework.transaction.annotation.Transactional

I don't understand what is the actual difference between annotations javax.transaction.Transactional and org.springframework.transaction.annotation.Transactional? Is org.springframework.transaction.annotation.Transactional an extension of…
stamis
  • 2,545
  • 2
  • 15
  • 9
103
votes
4 answers

Persistence unit as RESOURCE_LOCAL or JTA?

I have queries as below: What is the difference of these two? Are both of these supported by all databases? Are JPA TransactionManager and JTA TransactionManager different?
cometta
  • 35,071
  • 77
  • 215
  • 324
97
votes
4 answers

What is the difference between JTA and a local transaction?

What is the difference between JTA and a local transaction? An example that shows when to use JTA and when to use a local transaction would be great.
user1127214
  • 3,109
  • 7
  • 26
  • 30
77
votes
1 answer

persistence.xml different transaction-type attributes

In the persistence.xml JPA configuration file, you can have a line like: or sometimes:
Germano Massullo
  • 2,572
  • 11
  • 40
  • 55
71
votes
3 answers

Difference between JTA, JPA and plain JDBC in hibernate

What is the difference between JTA, JPA and plain JDBC in terms of Hibernate?
Aashutosh
  • 839
  • 1
  • 10
  • 8
57
votes
1 answer

Difference between a "jta-datasource" and a " resource-local " datasource?

The terms "jta-datasource" and "resource-local datasource" are a little vague to me. I'm putting down what I am understanding ( or assuming ) and I'd like you to say where I'm right / wrong. The same database can be referred to as a jta-datasource…
stratwine
  • 3,663
  • 2
  • 26
  • 32
41
votes
2 answers

Atomikos vs JOTM vs Bitronix vs?

I am new to JTA and it's underlying transaction managers. Can anyone explain the pros/cons of each of these? Feel free to add others I didn't list in title. Also, don't the major applications servers (WebSphere, JBoss, Glassfish) have their own JTA…
Dave
  • 21,524
  • 28
  • 141
  • 221
39
votes
2 answers

When does @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) commit?

An EJB method named Aby calls another EJB method named Bob Bob is marked with @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) When does bob transaction commits?: a) when bob invocation ends b) when aby invocation ends c) other. when?
SDReyes
  • 9,798
  • 16
  • 53
  • 92
31
votes
3 answers

What is difference between @Resource UserTransaction and EntityManager.getTransaction()

Can anybody explain what is difference between : @Resource UserTransaction objUserTransaction; and EntityManager.getTransaction(); And also what is container managed transaction? and how should I do it in my session facade if I want to insert…
TCM
  • 16,780
  • 43
  • 156
  • 254
31
votes
2 answers

Transactional annotation on whole class + excluding a single method

I have a class with @Transactional annotation (instead of marking it for all of its method). Although i have a single method inside that class that shouldn't be annotated as @Transactional. My question is is there an annotation i can put in this…
Urbanleg
  • 6,252
  • 16
  • 76
  • 139
27
votes
1 answer

which transaction manager should I use (JTA vs JPA)?

I have spring 4 application. At the moment I use JpatransactionManager.
grep
  • 5,465
  • 12
  • 60
  • 112
25
votes
5 answers

What is a good open source Java SE JTA TransactionManager implementation?

Basically, what it says on the tin; I need a JTA implementation useable in a Java SE application, ideally one that doesn't carry too much of a framework burden with it.
Chris R
  • 17,546
  • 23
  • 105
  • 172
25
votes
2 answers

Why different persistence units with separated data sources query the same data source?

I'm developing a webapp which needs access to two different database servers (H2 and Oracle). The container is an Apache Tomee 1.5.1 and I'm using the Java EE stack with libraries provided in it (JSF, JPA, CDI, EJB, etc.). I'm trying to use two…
Alberto Segura
  • 755
  • 1
  • 12
  • 28
22
votes
1 answer

Difference between UserTransaction and EntityTransaction

Title says it all: What is the difference between a UserTransaction and an EntityTransaction? My rudimentary understanding is that UserTransaction is used when JTA is required (e.g. to do queries on mulitple things), and that EntityTransaction is…
bguiz
  • 27,371
  • 47
  • 154
  • 243
22
votes
2 answers

How to use JTA support in Tomcat 6 for Hibernate?

They recommend using JTA transaction support in Java EE environment. But how to configure JTA in Tomcat6 so that Hibernate Session could use it ? Starting with version 3.0.1, Hibernate added the SessionFactory.getCurrentSession() method. Initially,…
EugeneP
  • 11,783
  • 32
  • 96
  • 142
1
2 3
75 76