record « Transaction « JPA Q&A





1. Update n number of records using JPA with Optimistic locking    stackoverflow.com

I have a table with a column called "count" and I want to run a cron job that will trigger a statement that performs a SQL like this:

update summaryTable set count=4;
Note ...

2. is a record locked when entitymanger works on it?    stackoverflow.com

I have a transaction which uses one entitymanager em1. Inside this transaction i call a method. Now this method creates one more entitymanager em2. Now em2 operates on some data and ...

3. Hibernate calling get() after save() on the newly created record within the same transaction    stackoverflow.com

I'm using hibernate 3.2.7 without spring (don't ask, client doesn't support spring) and I'm running into an issue with my implementation of the open-session-in-view pattern. When I persist an object ...

4. Optimist locking - two apps accessing same db and records    forum.hibernate.org

I've got two web applications, each is bundled in it's own ear and each ear is deployed on a separate (glassfish) server instance. T EAR1 (with WAR1) => server1 EAR2 (with WAR2) => server2 Both web applications access the same (Oracle) database. In both applications I'm using Hibernate's optimistic version number-based locking approach. Everything worked fine. However due to a change ...

5. Records of mysql getting locked after exception in update    forum.hibernate.org

Hi, I am using J2ee application. I need to perform update on mysql using update method. I am using version number as part of concurrency control. Steps i login to application 2 select a record to update -- > takes me to a new update page 3 click update button result is my record gets updated But when 1 I login ...

6. Record Locking    forum.hibernate.org

Hi all! I'm currently trying to generate my primary keys based on a table that is held in my DB. For example, I have a table that has a table (PRIMARY_KEY) that consists of columns "TABLE_NAME" and "PRIMARY_KEY_VALUE". An example of a record that might exist in this table is: TABLE_NAME, PRIMARY_KEY_VALUE RESOURCE, 1000 What I want to do when I ...

7. Can't lock records in Oracle 9i Database    forum.hibernate.org

Newbie Joined: Mon Sep 20, 2004 11:24 pm Posts: 2 Read the rules before posting! http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 2.1.6 Mapping documents: ACTION_SQ_ID

8. what record causing the error after commit ?    forum.hibernate.org

My program read a ascii file with 1000 records. I read 100 rows at a time and perform saveOrUpdate on oracle db. During the commit, i catch an exception. How can I determine what is the record causing the problem ? Oracle only tell an error. HibernateException don't tell me more. What is your opinion ?

9. How to get details about a record that failed commit    forum.hibernate.org

Hibernate version:3.0.5 Name and version of the database you are using: Oracle 10g Ok, here's the deal. I got one oracle db. I got multiply processes accessing the db using a single API which wrapps hibernate. Those processes communicate with the outside world and all together should be able to insert the db an approximate amount of 10 million records a ...





10. Locking a record only for a certain period of time?    forum.hibernate.org

I am planning to use Hibernate 3.2.2 together with MS SQL Server 2000 for my project. I have a requirement as follows: When a user selects a record for edit, the record must be locked. If the user does not submit any update within 20 minutes, then the record can be edited by other users after 20 minutes. If the user ...

11. even after tx.rollback() ; record gets inserted into Databas    forum.hibernate.org

In my following small test class : Session sess = new Configuration().configure("conf/hibernate.cfg.xml").buildSessionFactory().getCurrentSession(); Transaction tx = sess.beginTransaction(); System.out.println(sess.connection().getAutoCommit()); Country count = new Country ("abc", 788, "abc"); sess.save (count); System.out.println(tx.wasRolledBack()); tx.rollback(); System.out.println(tx.wasRolledBack()); I get following output false false true which shows that tx was rolledback; but when I check DB the record is inserted there .. !! For reference: hibernate.config.xml is