-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: 2 questions - avoiding blocking and mapping time zones
PostPosted: Mon Mar 05, 2007 6:29 am 
Newbie

Joined: Wed Apr 19, 2006 12:50 pm
Posts: 8
i have two rather simple questions:

1) i am trying to lock a row prior to doing the update in order to avoid blocking other transactions updating the same row (i am using optimistic locking with a version column).
I am doing the following to lock and update:

session.lock(customer, LockMode.UPGRADE_NOWAIT);
session.evict(customer);
session.update(customer);

as far as i understand the evict is needed in order to make the object detached before any update can occur. However i am in doubt if this is the best approach..?


2) I need to map a timestamp with time zone information. Is the only way to do this mapping via implementing a custom mapping type or is there a simpler way..?


regards
Rasmus


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.