1 Reply Latest reply on May 31, 2017 9:34 AM by WolfShade

    multiple users accessing an index.cfm

    vmavma Level 1

      I have an application that displays some data retrieved from the database on index.cfm. It retrieves a few fields/columns from a table and displays them on screen. Users make modifications and save it - using a button. The page calls a cfm that calls a database (sql server) procedure to save it. I am trying to understand what will happen when multiple users access this. Multiple users are accessing this. I am not explicitly using any cfthread or lock to protect anything. I access a few session variables to identify the user who is logged on - and present some information relevant to them. How does Coldfusion keep the invocation of that index.cfm by multiple users separate and provide state?


        • 1. Re: multiple users accessing an index.cfm
          WolfShade Level 4

          CFTHREAD probably won't make any difference, for you (unless you have over 100,000 users at a time.)  However, you should most definitely be using an exclusive CFLOCK around the query that SELECTs the information, as well as the query that UPDATEs the information so that user A isn't reading the data at the same millisecond user B is updating it.


          ColdFusion uses a combination of CFID and CFTOKEN to keep sessions identified with particular users.


          I hope you are at least using CFQUERYPARAM when updating information to the database.