UserTransaction « Transaction « JPA Q&A





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

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

2. Java: Difference betwen UserTransaction and EntityTransaction    stackoverflow.com

Title says it all: What is the difference between a UserTransaction and a EntityTransaction? My rudimentary understanding is that UserTransaction is used when JTA is required (e.g. to do queries on mulitple ...

3. Unable to find interface javax.transaction.UserTransaction;    stackoverflow.com

I am trying to setup a new Netbeans project with JPA. The Java SDK version is 1.5.0_22-b03 and J2EE version is J2EE 1.4.I am using TOPLINK Essentials for JPA. Going by ...

4. EE5 JPA with JTA/UserTransaction -- non-Container managed transactions    forums.netbeans.org

Why does code like: emf = javax.persistence.Persistence.createEntityManagerFactory("EmployeeService"); provide an emf that will not work properly? see more info below: Rather than code like: @PersistenceUnit(unitName = "EmployeeService") public EntityManagerFactory emf; @Resource public UserTransaction utx; the JavaEE API says one can do the following: public EntityManagerFactory emf; public UserTransaction utx; and initialize emf and utx like: InitialContext ic = new InitialContext(); utx = ...

5. Re: EE5 JPA with JTA/UserTransaction -- non-Container managed transactions    forums.netbeans.org

Persistence.createEMF() is not same as @PersistenceUnit EMF emf; If you don't like injection, you can look up emf using JNDI and that will give you same behavior, but Persistence.creatEMF is called "Java SE" style of obtaining an EMF and that's not recommended to be used in EE apps, for in Java SE, things like JTA may not be supported by the ...

6. EE5 JPA with JTA/UserTransaction -- non-Container managed transactions    java.net

If you don't like injection, you can look up emf using JNDI and that will give you same behavior, but Persistence.creatEMF is called "Java SE" style of obtaining an EMF and that's not recommended to be used in EE apps, for in Java SE, things like JTA may not be supported by the EMF. In fact, unless you explicitly configure transaction-type ...

7. RollbackException on UserTransaction.commit()    forum.hibernate.org

I have a JUnit test that calls a helper class method to do some stuff. In the helper class some EJB2s are called that perform Hibernate inserts and reads. The work is done in a UserTransaction and when at the end commit() is called a weblogic.transaction.internal.AppSetRollbackOnlyException is thrown with as cause "weblogic.transaction.RollbackException: Unknown reason" Any idea what goes wrong? JUnit test: ...

8. [JTA] UserTransaction doesn't commit or rollback    forum.hibernate.org

org.hibernate hibernate-annotations 3.4.0.GA compile ...

9. How can I test a JTA UserTransaction Rollback?    forum.hibernate.org

Hello Hibernate Users, I have code something similar to this: Code: // BMT idiom with getCurrentSession() try { UserTransaction tx = (UserTransaction)new InitialContext() .lookup("java:comp/UserTransaction"); tx.begin(); // Do some work on Session bound to transaction ...





11. Diff b/w java:/TransactionManager and java:/UserTransaction    forum.hibernate.org

Newbie Joined: Fri Aug 10, 2007 2:04 am Posts: 7 My original post got obsolete after my latest findings , which is why i am posting a new question. I am trying to use JTA programmatically using JTA's UserTransaction interface + Hibernate Core API. My Hibernate version is 3.2.4 SP1. Using JBoss 421GA Application Server. Following the suggestion provided at http://www.hibernate.org/42.html#A5 ...