I'll give a quick summary of what my application does.
I have an interface built for employees to make changes to a
config.dat file of some software we use, they make whatever changes
they need through the forms and it re-writes and reloads the file.
This software is installed on 12 servers, along with Coldfusion and
the .CFM that rewrites the config.dat. We'll call this .CFM "A". I
store the server information like the external IP address in a
table, so the tool the employees use knows where to POST to for
making the changes to the file.
I also have a seperate .CFM file, we'll call this "B", on
each of those 12 servers, which does close to the same thing, but
is for developers to POST to for making changes to the file for
My biggest concern is that someone will be writing to the
file with script A while a developer posts to script B to read or
write the same config.dat file and it all explodes.
Can I make script A and B use CFLOCK's on the CFFILE reads
and writes using the same name on the locks with type exclusive to
prevent such a problem? What's the best way to protect the file