Login  Register

RE: Duplicate orders being sent out of ofbiz

Posted by Dimitri Unruh-2 on Jul 07, 2006; 1:00pm
URL: http://ofbiz.116.s1.nabble.com/Duplicate-orders-being-sent-out-of-ofbiz-tp169456p169459.html

Hi

we also have the same (or nearly the same) problem.

We have one service, which is running through the OrderHeader-Entity and
does some operations with the resultSet.
I don't know what's going on there, but it seems, that this piece of code
makes the hole trouble:


Object feldname = "syncStatusId";
Object feldwert = null;

Map whereFelder = new HashMap();
whereFelder.put(feldname, feldwert);
whereFelder.put("orderTypeId", "SALES_ORDER");

List ordersList = delegator.findByAnd("OrderHeader", whereFelder);

if (ordersList.size() > 0) {

   .... do some operations ..
}


We run this service every 10 minutes and in about 99% everything is going
fine.
But sometimes I get this mysterios situation:
the size of the "ordersList" is for example 5, but the are only 3 related
databaserows.
So I got 2 duplicate orders in the list "ordersList".

How could this happen? I have no ideas anymore...



Best Regards

Dimitri Unruh

Lynx Consulting Group
Johanniskirchplatz 6
D-33615 Bielefeld
T: +49 (0) 521 / 52 47 - 408
[hidden email]
http://www.lynx.de