details:   /erp/devel/pi/rev/a91aa1bb9dfc
changeset: 12153:a91aa1bb9dfc
user:      Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
date:      Fri May 13 11:32:23 2011 +0200
summary:   fixes deprecated method related to library update

diffstat:

 src/org/openbravo/erpCommon/ad_process/PaymentMonitorProcess.java |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r 310c45e82c0d -r a91aa1bb9dfc 
src/org/openbravo/erpCommon/ad_process/PaymentMonitorProcess.java
--- a/src/org/openbravo/erpCommon/ad_process/PaymentMonitorProcess.java Fri May 
13 10:42:25 2011 +0200
+++ b/src/org/openbravo/erpCommon/ad_process/PaymentMonitorProcess.java Fri May 
13 11:32:23 2011 +0200
@@ -2,7 +2,7 @@
 
 import java.util.List;
 
-import org.hibernate.LockMode;
+import org.hibernate.LockOptions;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.dal.service.OBQuery;
@@ -52,7 +52,8 @@
       }
       final List<Invoice> invoices = obqParameters.list();
       for (Invoice invoice : invoices) {
-        OBDal.getInstance().getSession().lock(Invoice.ENTITY_NAME, invoice, 
LockMode.NONE);
+        
OBDal.getInstance().getSession().buildLockRequest(LockOptions.NONE).lock(
+            Invoice.ENTITY_NAME, invoice);
         PaymentMonitor.updateInvoice(invoice);
         counter++;
         OBDal.getInstance().getSession().flush();

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to