jta

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, messaging, etc - we haven't decided). Now my manager thinks we'll need the Java and C++ sides to...

Spring JTA TransactionManager config: Supporting both Tomcat and JBoss

I have a web application using JPA and JTA with Spring. I would like to support both JBoss and Tomcat. When running on JBoss, I'd like to use JBoss' own TransactionManager, and when running on Tomcat, I'd like to use JOTM. I have both scenarios working, but I now find that I seem to need two separate Spring configurations for the two ca...

Last Resource Optimization

I'm writing a Resource Adaptor which does not support two phase commit. I know there is an optimization technique called: "Last Resource Optimization". On JBoss your XAResource class should implement LastResource in order to have the optimization. My question is: how this can be done in WebLogic, WebSpehre, Glassfish, etc... ...

How do you determine if a JDBC Connection was retrieved from a JTA enabled DataSource or straight JDBC?

I'm using a vendor API to obtain a JDBC connection to the application's database. The API works when running in the application server or when running in a stand-alone mode. I want to run a series of SQL statements in a single transaction. I'm fine with them occurring in the context of the JTA transaction if it exists. However, if it doe...

How to integrate Geronimo's transaction manager in Tomcat?

Does Geronimo provides a standalone transaction manager? And if it does, is it possible to use it in Tomcat? ...

REQUIRES_NEW annotated method is executed without a transaction?

I have a stateless bean resposible for persisting entities to a database. This stateless bean is called by a message bean's onMessage method. The wired thing is that on the first message everything works fine, but on the next message the method responsible for persisting is invoked outside a transaction, even though the method is annotat...

Java Transactions API and .NET System.Transactions

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 seems more a specification, leaving to developers the obligation to implement either the Transactions, TransactionMana...

What is a good open source J2SE JTA TransactionManager implementation?

Basically, what it says on the tin; I need a JTA implementation useable in a J2SE application, ideally one that doesn't carry too much of a framework burden with it. ...

What do I need to do to integrate JTA into a J2SE application?

Suppose I want to implement an application container. Not a full-on JEE stack, but I need to provide access to JDBC resources and transactions to third party code that will be deployed in an application I'm writing. Suppose, further, that I'm looking at JBossTS for transactions. I'm not settled on it, but it seems to be the best fit f...

Why isn't bitronix (BTM) binding the user transaction into JNDI?

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 session after I call TransactionManager.begin(): 14:21:32,350 ERROR [JTATransaction] Could not find UserTransaction in JNDI javax.naming.NameNotFoundException: Name Us...

Is it possible to use more than one persistence unit in a transaction, without it being XA?.

Our application needs to use (read-only) a couple different persistence units pointing to different databases (different, commercial vendors as well). We do not have the budget to enable 2pc on one of them (Sybase). Is there a way to use these in a transaction without it having to be an XA transaction? We're using Websphere 6.1, Sybas...

Is there an open-source solution to XA-transactional file access in Java?

Hi, 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 distributed transaction via JTA (so I guess the file system needs to be accesses as a XAResource). I don't need support for fine-grained read/write fil...

How to get hibernate-entitymanager to work with JTA out of JBoss?

I am building a tool for out-of-container EJB testing. I have managed to run Hibernate's EntityManager in it successfully. Now I want to integrate it with JTA to enable strict control of transactions. The problem I am faced with is the following: Hibernate seems to require JNDI to work correctly with JBossTS (JBoss's JTA implementation)...

Hibernate EntityManager + JOTM: transactions are not used

I am trying to integrate together JOTM and Hibernate EntityManager to test my EJBs in a transactional manner environment but out-of-container. My test looks like the following: Start JOTM Put JOTM's UserTransaction into JNDI Create and configure StandardXADataSource Put the DataSource into JNDI Configure hibernate and create EMF Creat...

Atomikos + Jetty in a Maven build environment - Classloader issue?

I am working on a project with multiple JDBC data sources and JTA. I use Maven as a build tool, and I'd like to use the Jetty plugin (6.1.20) to run the application during development. I am trying to configure Jetty to use Atomikos as the transaction manager. I'm following the Atomikos documentation from Jetty, but the Jetty startup fai...

Make transactionless EJB call inside a transaction

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 calls some other web services (out of transaction context) and also makes a couple of remote EJB calls on other server. The problem is that container s...

Can a single EntityManager (Hibernate) participate in multiple concurrent transactions?

Hi! Is there a way one EntityManager can participate smoothely in multiple concurrent transactions? Well, not that concurrent. Something like: Start tx 1 Do stuff in tx 1 Start tx 2 Do stuff in tx 2 Commit tx 2 Join tx 1 back Do stuff in tx 1 Commit tx 1 with steps followed one by one not overlapping. ...

Get JTA transaction timeout value in WebLogic

Is there a way to get JTA transaction timeout value? UserTransaction interface has only setTransactionTimeout method. Is there a specific way of getting its value in WebLogic? ...

Simulation of long-running Oracle DB query

What is the simplest (preferably without any new table creation) way of running a database query which takes long time (at least several minutes) in Oracle DB? ...

Best way to manage transactions

I've the JBoss and Hibernate based system. And I need to process two long operations. Operations can be probably longer than transaction's timeout. It operations are persists many-many entities, in two different transactions. And if something goes wrong, during this operations, I should rollback all changes of the transactions. What's ...