Is there a way to refresh session variables mid-script? And should it be necessary to do so anyway?
We're writing a script to handle the situation where a payment page is submitted more than once. The simplified script below shows how we use a transaction to manage locking the session. We have multiple nodes, use a datasource for session data and include this.sessioncluster=true in our Application.cfc.
If you run the script in a few browser windows, each returns "1". I expected that only the first call would return "1" and subsequent pages called while the first transaction was processing would return an error.
<cftransaction action="begin" isolation="serializable">
<cfquery name="sessionlock" datasource="customer">
select customer from customer where customer='1' for update
Is this a bug or am I mistaken? If I am mistaken, is there a way to refresh the session data after the start of the transaction?