eclipselink « Transaction « JPA Q&A





1. How should one handle a javax.persistence.OptimisticLockException?    stackoverflow.com

I'm new to JPA so forgive me if not being clear. Basically I want to prevent concurrent modifications by using Optimistic Locking. I've added the @Version attribute to my entity class. I need to ...

2. Forcing a method to be non-transactional in JPA (Eclipselink)    stackoverflow.com

I am developing an application using Eclipselink and as part of the app I need to be able to manipulate some of the objects which involves changing data without it being ...

3. EclipseLink: Checking current transaction isolation level    stackoverflow.com

I have a standalone Java application that uses EclipseLink 2.0.1. It is configured by a persistence.xml, and then does something like:

final EntityManagerFactory emf = Persistence.createEntityManagerFactory("xy");
final EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
....
em.getTransaction().commit();
I want to ...

4. JPA / EclipseLink Eager Fetch leaving data unpopulated (during multiple concurrent queries)    stackoverflow.com

We are trying to load some entities into our classes on startup. The entities we are loading (LocationGroup entities) have an @ManyToMany relationship with another entity (Location entities), defined by a ...

5. JPA, Eclipselink - Relations are deleted on new transaction    stackoverflow.com

I'm building a small eclipse rcp with a little bit of JPA. Now something strange happens: I create some TopCategories with some SubCategories, this works as intended. The inserts are printed in ...

6. can you create your own JTA transaction?    stackoverflow.com

I am loading a large set of data into a database from a webservice. I am using eclipslink for persistence and running the application on glassfish 3.0. I run into problems ...

7. JPA: locking dependent objects (eclipselink)    stackoverflow.com

i have a simple one to many relationship in JPA. for the sake of discussion assume my entities are Person and Phone, where a Person can have many Phone (numbers). both object ...

8. Why EclipseLink 's auto commit doesn't work with MySQL?    stackoverflow.com

Using the following code:

EntityManager manager = factory.createEntityManager();
manager.setFlushMode(FlushModeType.AUTO);
PhysicalCard card = new PhysicalCard();
card.setIdentifier("012345ABCDEF");
card.setStatus(CardStatusEnum.Assigned);

manager.persist(card);
manager.close();
when code runs to this line, the "card" record does not appear in the database. However, if using the FlushModeType.COMMIT, and ...

9. How can I determine why JPA/eclipselink/J2EE is issuing a ROLLBACK to the DB?    stackoverflow.com

I am chasing a problem where I see SQL statements run in my database log in a transaction, then see that transaction rolledback. This happens on both Oracle and Postgres, but only ...





10. JPA. Transaction problems while migrating from Hibernate to Eclipselink    stackoverflow.com

Standard JEE environment: JPA + EJB called from JSF beans. Server: glassfish 3.1.1 Code which is developed, tested and deployed with Hibernate as JPA provider, refuses to persist entities with Eclipselink - ...

11. JPA : Could not locate TransactionManager    stackoverflow.com

I'm using JPA 2 in a JSF 2 project, so I configure my data source in the GlassFish v3, everything is fine, but if I try to test JPA queries in ...