While creating/changing application scope variables in a
lock, I think there must be an exclusive lock. You must be careful
not to set any shared variable such as application inside a read
only cflock tag.
I also would suggest to check the usage of Application.cfc
and onApplicationStart method. You can set application default
variables and constants in onApplicationStart method in your