svn commit: r580096 - /ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r580096 - /ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml

jonesde
Author: jonesde
Date: Thu Sep 27 09:57:11 2007
New Revision: 580096

URL: http://svn.apache.org/viewvc?rev=580096&view=rev
Log:
Fixed issue with this when in a high volume environment, now uses the more multi-thread safe EE sequence stuff, common when lots of orders or other inventory operations on a single item are happening simultaneously

Modified:
    ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml?rev=580096&r1=580095&r2=580096&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml Thu Sep 27 09:57:11 2007
@@ -250,7 +250,8 @@
         <make-value value-name="newEntity" entity-name="InventoryItemDetail"/>
 
         <set from-field="parameters.inventoryItemId" field="newEntity.inventoryItemId"/>
-        <make-next-seq-id seq-field-name="inventoryItemDetailSeqId" value-name="newEntity" increment-by="1" numeric-padding="4"/>
+        <!-- NOTE DEJ20070927: not using make-next-seq-id because a single InventoryItem may see traffic from lots of threads at the same time, and make-next-seq-id doesn't do well with that <make-next-seq-id seq-field-name="inventoryItemDetailSeqId" value-name="newEntity" increment-by="1" numeric-padding="4"/> -->
+        <sequenced-id-to-env sequence-name="InventoryItemDetail" env-name="newEntity.inventoryItemDetailSeqId"/>
         <field-to-result field-name="newEntity.inventoryItemDetailSeqId" result-name="inventoryItemDetailSeqId"/>
 
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
@@ -259,7 +260,6 @@
         <if-not-empty field-name="parameters.itemIssuanceId">
             <entity-one entity-name="ItemIssuance" value-name="itemIssuance"/>
             <set field="newEntity.effectiveDate" from-field="itemIssuance.issuedDateTime"/>
-            
             <else>
                 <now-timestamp-to-env env-name="newEntity.effectiveDate"/>
             </else>