I plan to run the following two processes. In order to maintain data consistency I plan to use CFLOCK. I've never use CFLOCK in the past and not sure if this is going to work in maintaining data integrity. Please advise.
<cfexecute name="SomeName" arguments ="#PathToFile# #PathToLogfile#" errorFile="#PathToErrorFileLog#" outputFile="#PathToOutPutFileLog#"
SET UserID = '#session.userid#'
WHERE NVL(userid,' ') = ' '
cfexecute is inserting data from a text file into a temp table.
There is one column in temp table that is not in the text file and that column is UserId column.
Aftr Oracle sqlldr inserting all data from text file to the temp table, I update userid column in temp table to the session.userid. This way I know who own the data after the process is done.
..update userid column in temp table to the session.userid. This way I know who own the data after the process is done.
You apparently want that no two users should be able to access the code simultaneously. If so, then you should perhaps not be using the session lock. A session lock prevents two separate requests in the same user-session from accessing the code simultaneously.
You could use a named lock. For example,
<cflock name = "someUniqueName" timeout = "30" type = "Exclusive">