Develop > Presentation layer


Double-click handling in WebSphere Commerce

The purpose of double-click handling in WebSphere Commerce is to prevent processing the same request twice to ensure data integrity within the system. When processing certain URL requests, such as OrderItemAdd, the double-click feature of WebSphere Commerce will identify whether the request from the online shopper is currently being processed and blocks the current request if that is the case.

Without the double-click feature, it is entirely possible that the URL request can be processed twice. For example, if the online shopper clicks twice on the link that results in the OrderItemAdd, this command could execute twice, resulting in two identical order items added to the online shopper's shopping cart. If the online customer was not aware that this occurred, they may complete the shopping flow and purchase two instances of the product when they only wanted one. Although most online shoppers will catch this inconsistency, the problem will manifest itself when the operation performed is OrderSubmit. This could result in the payment of two orders when only one order has been submitted. The online shopper may not be aware of this until they receive their bill and realize they are being charged twice for the same purchase.

Not only does double-click prevent URL requests from being performed twice, it can also be used to prevent deadlock issues that can result when processing multiple operations on the same data elements. By ensuring the operation cannot be executed twice, updates to the same data elements will not be performed and deadlocks are prevented.

To determine if double-click processing is required, identify whether the operation results in changed data. Read-only requests that only display data typically do not require double-click support. For those requests that create, update and delete data, such as the order processing operations, double-click processing is required.


Related concepts

WebSphere Commerce framework interaction


Related tasks

Configure double-click handling

Related reference

Double-click handling on the client-side using JavaScript


+

Search Tips   |   Advanced Search