timestamp « Transaction « JPA Q&A





1. Optimistic concurrency in hibernate using version/timestamp.    coderanch.com

Hi All, I didn't understand how optimistic concurrency will work in hibernate? As per my knowledge, we need to have either VERSION or TIMESTAMP column in persistence table which is mappend to hibernate. Say we are having TIMESTAMP column then whenever we execute INSERT,UPDATE statement hibernate will modify TIMESTAMP column with system timestamp. When we try to update a row and ...

2. Optimistic locking, timestamp, saveOrUpdate    forum.hibernate.org

Hi, I have a problem with optimistic locking using timestamp. I am using MySQL. My hbm file looks like this: --------------------------------------------------------------------------------- The Java code: ses.saveOrUpdate( ...

3. Timestamp as optimistic locking column problem    forum.hibernate.org

Newbie Joined: Tue Aug 24, 2004 2:26 pm Posts: 6 Hibernate version: 2.1.6 Mapping documents: Department: Code: ...

4. optimistic locking using timestamp    forum.hibernate.org

Hi, I am trying to use optimistic locking with timestamp. I followed example from the book and I could not get that work. I don't see the StaleObjectStateException been thrown. I have this in mapping file: and this maps a column of database table, LAST_MODIFIED_DATE, which the type is Date (Oracle 9i). In POJO code, I have: ...

5. Optimistic locking through Timestamp field ?    forum.hibernate.org

For doing the concurrency control in mapping xml through a timestamp field and this timestamp field in my case is a member of another object, which is encapsulated in the main object. I am specifying this versioning in the following way:

6. application transaction with timestamp    forum.hibernate.org

Hi, i need to manage this concurrency: - user A edit a record - user B edit the same record - user A save - when userB try to save, i expect an error (a StateObjectStateException), but all works fine and the last user win. What's worg? This is my mapping file :

8. Timestamp optimistic-lock problem    forum.hibernate.org

Beginner Joined: Wed Jul 14, 2004 11:51 am Posts: 41 Hibernate version:3.0 Mysql 4.1.13 Hi, I'm having problem with my timestamp optimistic-lock automatic versioning. My problem is that (for some weird reason) I don't always get a StaleObjectStateException when concurrent modifications are made. Here is a simple test case that illustrates this: Code: protected void setUp() throws ...

9. Same timestamp value used across the whole transaction    forum.hibernate.org

Hibernate version: 3.1.3 Name and version of the database you are using: Oracle 10g Hi, I would like to ask if it is possible for Hibernate to use exactly the same timestamp value when saving or updating a hierarchy of objects during one Transaction. It is required by our DB administrator that we have the same timestamp in all the object ...