JTA « Transaction « Java Database Q&A





1. Distributed Processing: C++ equivalent of JTA    stackoverflow.com

I'm developing a mission-critical solution where data integrity is paramount and performance a close second. If data gets stuffed up, it's gonna be cata$trophic. So, I'm looking for the C/C++ version of ...

2. Java Transactions API and .NET System.Transactions    stackoverflow.com

I'm analyzing the different behaviors between the JTA (Java Transactions API) and the .NET counterpart System.Transactions: the approach is quite different between the two of them. In fact, Java's version of Transactions ...

3. Why isn't bitronix (BTM) binding the user transaction into JNDI?    stackoverflow.com

Looks like Bitronix, as suggested elsewhere, works very well. However, I'm stumped by a problem with it. I get this exception from Hibernate, when I attempt to save the ...

4. Is there an open-source solution to XA-transactional file access in Java?    stackoverflow.com

Is it possible to make XA-transactional access to the file system in Java? I want to manipulate files within the boundaries of a transaction and my transaction must participate in a ...

5. Make transactionless EJB call inside a transaction    stackoverflow.com

I'll try to describe the situation. We have a web service; on each request web service starts a JTA transaction. It performs several database calls through XA datasource within that and ...

6. Java Transaction API (JTA) Overview Help    stackoverflow.com

Can someone give me a good explanation on the motivation and application of JTA in modern Java applications? I don't want overly technical details. But just a paragraph on why do ...

7. Java Distribute Transaction    stackoverflow.com

I want to rollback a transaction which already committed, does JTA support this kind of function?

8. How to manage transaction for database and file system in jee environment?    stackoverflow.com

I store file’s attributes (size, update time…) in database. So the problem is how to manage transaction for database and file. In jee environment, JTA is just able to manage database transaction. ...

9. Defines JEE 5 the handling of commit error using bean managed transactions?    stackoverflow.com

I'm using glassfish 2.1 and 2.1.1. If I've a bean method annotated by @TransactionAttribute(value = TransactionAttributeType.REQUIRES_NEW). After doing some JPA stuff the commit fails in the afterCompletion-Phase of JTS. GlassFish logs this failure ...





10. How can i attach data to a JTA transaction? (or uniquely identify it)    stackoverflow.com

I have a getStockQuote() function that will get a current stock quote for a symbol from the stock market. My goal is that within a JTA transaction, the first call to getStockQuote() ...

11. Atomikos vs JOTM vs Bitronix vs?    stackoverflow.com

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 ...

12. WebSphere local transaction containment boundary issue J2CA0086W    stackoverflow.com

In WebSphere, if you code opens two concurrent database connections, you get an error of the form: J2CA0086W: Shareable connection MCWrapper id 556e556e Managed connection WSRdbManagedConnectionImpl@52365236 State:STATE_TRAN_WRAPPER_INUSE from resource jdbc/abc ...

13. Setting Transaction Isolation Level in Berkeley DB Java Edition for Distributed Transactions (XA)    stackoverflow.com

I am using distributed transactions in a BDB JE application to coordinate transactions across multiple BDB JE environments. I want to set the transaction isolation level to serializable. To ...

14. How does UserTransaction propagate?    stackoverflow.com

I have a stateless bean with bean-managed transaction and a method like this:

@Stateless
@TransactionManagement(TransactionManagementType.BEAN)
public class ... {

    @Resource 
    private UserTransaction ut;
    @EJB ...

15. Can I reuse a UserTransaction instance after commit()?    stackoverflow.com


Is the reusage of the ut instance in the following code correct?

UserTransaction ut = (UserTransaction)ctx.lookup("java:comp/UserTransaction");  
ut.begin();  
doSomeWork();  
ut.commit();//Or rollback (I think it doesn't matter)  
ut.begin(); ...

16. Transaction not created automatically even if @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) is used    stackoverflow.com

I have such managed bean in my JEE6 app:

@Named
@RequestScoped
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public class RegistrationBean implements Serializable {

    @PersistenceContext
    EntityManager em;

    public String doRegistration() {
  ...





17. What does "TERMINATED" state of UserTransaction mean on Atomikos logs?    stackoverflow.com


I'm using Atomikos essential transactions as my TM in my J2SE application.
I have the following code:

if (userTransaction.getStatus()== Status.STATUS_ACTIVE){
userTransaction.commit();
}
and then I see in the logs the following exception:
java.lang.IllegalStateException: ...

18. use JTA transaction or not?    stackoverflow.com

I am developing a J2EE application which is deployed on JBoss application server. The application is composed of an EJB 2.x component and a web component and is running on local computer ...

19. Anyone aware of a test suite for JTA TransactionManager, UserTransaction, Transaction    stackoverflow.com

I am after a test suite that does sufficient tests for the core aforementioned jta interfaces:

  • TransactionManager
  • Transaction including enlisting/delisting of a XAResource
  • UserTransaction
I am adding a layer around jta system ...

20. If a XAResource is the only resource involved in a Tx should the XAResource.prepare() be called    stackoverflow.com

I am trying out a few things w/ JOTM and have some general purpose questions regarding how things work. I have listed the sequence of events to get a definitive summary ...

21. Why doesnt throwing an XAException from a XAResource still allow an transaction commit to succeed?    stackoverflow.com

I am trying out a few things w/ JOTM and have some general purpose questions regarding how things work. I have listed the sequence of events to get a definitive summary ...

22. Approach to automatically enlist/cleanup XAResources into new Tx?    stackoverflow.com

Because the TransactionManager has no way to register a XAResource manager, so that it can enlist XAResources in future Transactions. The only way to solve this problem is to wrap the handle ...

23. What is the meaning of Transaction?    stackoverflow.com

I've been reading about "Java Transaction" , and i've been confused about what's it? and what's useful in?

24. ibatis batch - when to start and execute    stackoverflow.com

We use ibatis 2.3 for the dao in our webservices. we have been using ibatis for a while now. We tie ibatis to JTA for transactions and normally start batches and ...

25. Accessing transaction status in container managed beans    stackoverflow.com

I have a @Stateless EJB using container managed transaction. Is there a way to access the "status" of javax.transaction.UserTransaction? That is, calling UserTransaction.getStatus() inside the bean methods? I know access ...

26. how to share one transaction between multi threads    stackoverflow.com

We meet an scenario that works with multi thread. In the main Thread, do some logic and update the database, in a point, it will call another service to update database, which ...

27. When should Transaction.delistResource() be called?    stackoverflow.com

We utilize in-memory LRU caches for several different models across our application. To avoid issues arising from transactions being rolled back (like stale entries), a notion of transactional caches was added: ...

28. Where are Websphere AS transaction manager logs?    stackoverflow.com

Does Websphere Application Server (7.0, preferably) have a log for transaction manager? I'd like to see how and when transactions are started for my application's threads, whether and when they commit ...

29. JDBC transactions, JTA transactions, Transaction demarcation    coderanch.com

The JDBC 3.0 specification is enlightening. The JDBC 3.0 specification says: {{ The default is for auto-commit mode to be enabled when the Connection object is created. If the value of auto-commit is changed in the middle of a transaction, the current transaction is committed. It is an error to enable auto-commit for a connection participating in a distributed transaction, as ...

30. JTA File and SQL Transactions    forums.oracle.com

I am trying to find some examples of how I might use JTA to solve a programming problem. I need the ability to wrap a transaction around two distinct events: a File write and a SQL transaction. I have a file that needs to be copied to a particular place and a corresponding SQL update statement to be executed. If either ...