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
21
votes
2 answers

What's the difference between nonXADatasource with jta="true" and XADataSource?

I was confused by the fact that we can allow to use JTA transactions with a non-XA-datasource. Link to the documentation. So what is the difference between XA/non-XA datasources? Why should we use XA-datasources at all?
user3663882
  • 6,957
  • 10
  • 51
  • 92
21
votes
3 answers

Java EE: Why use JTA directly?

I'm trying to understand JTA and am using Bitronix as the Transaction Manager of choice (just for the sake of learning and understanding). I'm looking at the code inside the Bitronix reference guide here and am wondering to myself: If I'm using…
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
21
votes
2 answers

Persistence.xml not correctly configured

I'm not able to get this persistence file correct... I do not find any more information in the book that I use as a guide. I'm using a MySQL database.
mmvie
  • 2,571
  • 7
  • 24
  • 39
21
votes
4 answers

JPA with JTA: Persist entity and merge cascaded child entities

I have a bidirectional one-to-many relationship with the following entity classes: 0 or 1 client <-> 0 or more product orders When persisting the client entity I want the associated product order entities to be persisted, too (as their foreign key…
SputNick
  • 1,231
  • 5
  • 15
  • 26
20
votes
1 answer

Missing javax.transaction.jta artifact

I am getting this missing artifact message for javax.transaction:jta:jar:1.0.1Bas403 Forbidden Multiple annotations found at this line: - Missing artifact javax.transaction:jta:jar:1.0.1B - ArtifactTransferException: Failure to transfer…
itsraja
  • 1,640
  • 4
  • 32
  • 48
20
votes
2 answers

JEE7: Do EJB and CDI beans support container-managed transactions?

Java EE7 consists of a bunch of "bean" definitions: Managed Beans 1.0 (JSR-316 / JSR-250) Dependency Injection for Java 1.0 (JSR-330) CDI 1.1 (JSR-346) JSF Managed Beans 2.2 (JSR-344) EJB 3.2 (JSR-345) In order to get rid of the chaos in my mind,…
SputNick
  • 1,231
  • 5
  • 15
  • 26
19
votes
2 answers

Cannot use an EntityTransaction while using JTA

I'm receiving this error: javax.servlet.ServletException: java.lang.IllegalStateException: Exception Description: Cannot use an EntityTransaction while using JTA. While trying to use JPA and JAVAEE, Glassfish. My persistence.xml file is as…
andreaxi
  • 931
  • 5
  • 15
  • 28
17
votes
3 answers

How to design global distributed transaction(none database)? Can JTA use for none db transaction?

I think this is a fairly common question: how to put my business logic in a global transaction in distributed systems environment? Cite an example, I have a TaskA containing couples of sub tasks: TaskA {subtask1, subtask2, subtask3 ... } each of…
zx_wing
  • 1,918
  • 3
  • 26
  • 39
16
votes
3 answers

How does UserTransaction propagate?

I have a stateless bean with bean-managed transactions, and a method like this: @Stateless @TransactionManagement(TransactionManagementType.BEAN) public class ... { @Resource private UserTransaction ut; @EJB private…
Truong Ha
  • 10,468
  • 11
  • 40
  • 45
15
votes
3 answers

How do I mock a TransactionManager in a JUnit test, (outside of the container)?

I'm using Spring 3.1.0.RELEASE, JUnit 4.8.1, and ultimately deploying my application to a JBoss 4.2 server (I know, I know). As part of setting up my unit test, I have this in my Spring test application context ...
Dave
  • 15,639
  • 133
  • 442
  • 830
14
votes
3 answers

Propagation of Oracle Transactions Between C++ and Java

We have an existing C++ application that we are going to gradually replace with a new Java-based system. Until we have completely reimplemented everything in Java we expect the C++ and Java to have to communicate with each other (RMI, SOAP,…
Steven Dick
  • 301
  • 2
  • 5
14
votes
2 answers

Hibernate session.close() not returning connection to pool

My application has long running transactions and hence I tried the option session.close() at the end of every method to ensure that the connection objects are not held indefinitely for long time. When session.close() option is used, I could see…
Perfuser123
  • 141
  • 1
  • 1
  • 3
13
votes
4 answers

dynamically register transaction listener with spring?

I have a springframework application in which I would like to add a transaction listener to a transaction which is currently in progress. The motivation is to trigger a post commit action which notifies downstream systems. I am using…
Justin
  • 4,437
  • 6
  • 32
  • 52
13
votes
1 answer

After upgrade of spring dependencies getting error A JTA EntityManager cannot use getTransaction()

I was using 1.7.4 and 4.0.1.RELEASE version of my project. Recently I upgraded both of these versions to …
user1246979
  • 235
  • 3
  • 10
13
votes
1 answer
1
2
3
75 76