Hi,

I have a kinds of counter that I have to increase and I am doing the
following action:

session = sf.openSession(); 
tx = session.beginTransaction(); 

DocNrCounterPJO counter = (DocNrCounterPJO )
aHibernateSession.get(DocNrCounterPJO .class, anId, aLockMode);
counter.currentStatus++;

// Do something... 
Thread.sleep(10000); 

session.update(counter);
session.flush();
session.commit();
session.close();

I am using Informix as target database and I saw that my row (counter) I
selected is not locked. I can access it during the sleep time using an
external SQL. The generated hibernate SQL statement seems to be correct
(SELECT ... FOR UPDATE).

Can somebody help me? Where is the problem ?

Thanks for your answer it is very critical. Yvan

PS: I am using Hibernate 2.1.4



Yvan Hess
Chief Software Architect

e-mail: [EMAIL PROTECTED]
phone : +41 (0)26 460 66 66 
fax   : +41 (0)26 460 66 60 

Informatique-MTF SA
Route du Bleuet 1 
CH-1762 Givisiez 
        
Excellence in Compliance and Document Management
http://www.imtf.com

DISCLAIMER 
This message is intended only for use by the person to whom it is addressed.
It may contain information that is privileged and confidential. Its content
does not constitute a formal commitment by IMTF. If you are not the intended
recipient of this message, kindly notify the sender immediately and destroy
this message. Thank You.



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to