wcw
05-25-08, 06:39 PM
Can anyone explain the use of MvLOCKFILE?
When looking at 4.13 source code I came across this in the authorize payment function:
<MvLOCKFILE FILE = "{ g.MerchantPath $ BasketList.d.session_id }">
Then there are several lines of code including converting the basket to an order and running all of the fulfillment modules (e.g. emails, etc). Then there is a </MvLOCKFILE> command.
It appears it is creating a file with this user's session_ID as the name of the file. So is it only locking processes for this specific user? Thus other customers shopping in merchant simultaneously don't have any files locked. Is that right? Or is everybody locked? Also, what files are locked? What purpose does it have if the files are not locked from other users updating files? Is MvEXPORT effected by the MvLOCKFILE command or is it only for databases?
The reference manual does not shed any light on this:
<MvLOCKFILE>
FILE="filename"
. Empty tag.
. Indicates to other processes that the current process has requested an exclusive lock on FILE.
. Multiple lock requests are queued.
. <MvLOCKFILE> tags can be nested.
When looking at 4.13 source code I came across this in the authorize payment function:
<MvLOCKFILE FILE = "{ g.MerchantPath $ BasketList.d.session_id }">
Then there are several lines of code including converting the basket to an order and running all of the fulfillment modules (e.g. emails, etc). Then there is a </MvLOCKFILE> command.
It appears it is creating a file with this user's session_ID as the name of the file. So is it only locking processes for this specific user? Thus other customers shopping in merchant simultaneously don't have any files locked. Is that right? Or is everybody locked? Also, what files are locked? What purpose does it have if the files are not locked from other users updating files? Is MvEXPORT effected by the MvLOCKFILE command or is it only for databases?
The reference manual does not shed any light on this:
<MvLOCKFILE>
FILE="filename"
. Empty tag.
. Indicates to other processes that the current process has requested an exclusive lock on FILE.
. Multiple lock requests are queued.
. <MvLOCKFILE> tags can be nested.