Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
CFRAM #1
Need Help with Locking
I need help with understanding about locking. I have my DSN created as
Application Variable . I want to lock a transaction in one of the module to is
used for update. I don't want users to get affected when browsing the data
using the other modules.
Thanks
CFRAM Guest
-
Contribute is locking up IIS
Hi, Our client is using Contribute 4 to update an asp.net site. He's been using it without any issues for months, but now he's getting an error... -
Locking A Query?
Greetings. I need some feedback on using cflock with a query. I essentially want to single thread just one piece of code (a query) on a page. ... -
implement locking
hi, I would like to lock a record so that when one user is modifying a particular record, then it is locked for all other users. For this... -
DB2 locking UDF dll
Meg wrote: Which version of db2 are you using? For v8, try set KEEP_FENCED to no (db2 update dbm cfg using KEEP_FENCED NO). This way, the fenced... -
[PHP] locking to domain
On Saturday 19 July 2003 00:00, Ryan A wrote: echo $_SERVER -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software... -
jdeline #2
Re: Need Help with Locking
Here are some references you may find useful.
[url]http://richmond-cfug.btgi.net/CFLOCK.PDF[/url]
[url]http://www.webtricks.com/sourcecode/code.cfm?CodeID=25[/url]
[url]http://livedocs.macromedia.com/coldfusion/5.0/Developing_ColdFusion_Applications[/url]
/appFramework.htm
jdeline Guest
-
CFRAM #3
Re: Need Help with Locking
Still I not clear by reading the articles. Does CFLOCK OR CFTRANSACTION work the same way as database row lock in Oracle.
CFRAM Guest
-
CFRAM #4
Re: Need Help with Locking
Still I am not clear by reading the articles. Does CFLOCK OR CFTRANSACTION work the same way as database row lock in Oracle.
CFRAM Guest
-
MattRobertson #5
Re: Need Help with Locking
They work nothing like a row lock. CFLOCK allows thread-safe access to
shared-memory variables, or (using a named lock) exclusive access to a code
block for one user... the latter of which you had better be REAL sure about
before utilizing.
CFTRANSACTION provides rollback capability in case a database operation (or
one of multiple operations encapsulated by a single cftransaction block) fails.
If i understand your post correctly, you want to ensure a single user has
access to a particular code block? If so, CFLOCK it with a named lock. i.e.
<cflock name="STRANGLER" timeout="3">
<cf_getThisOverWithQuick>
</cflock>
In the above, when one user invokes the lock named STRANGLER no one else can
invoke it (or run the code within) until that code is done and the lock is thus
released.
Generally this is something you never want to do in a web application.
'never' is perhaps too strong but not by much. Depending on your context
cf_LockMonger might be what you are after instead:
[url]http://mysecretbase.com/lockmonger.cfm[/url]
It will keep you from choking your web application to death ;-)
HtH,
--Matt--
MSB Web Systems... [url]http://mysecretbase.com[/url]
The trouble with most jobs is the job holder's resemblence to
being one of a sled dog team. No one gets a change of scenery
except the lead dog.
- Moer's truism
MattRobertson Guest
-
BKBK #6
Re: Need Help with Locking
>... I need help with understanding about locking.
If the code <cfset Application.myDSN = "RealDatabaseDSNname"> appears>... I have my DSN created as Application Variable
just once in your application, usually in Application.cfm or Application.cfc,
then
it is safe to use Application.myDSN everywhere, without the need for a lock.
BKBK Guest
-



Reply With Quote

