You want _one_ user to have access to it? Pseudo-code.cfm
application.cfm:
<cflock scope="application" type="exclusive" timeout=30>
<cfif isDefined("application.inUse") and
dateDiff("n",application.lastHIt,now()) lte 30>
<cfoutput>
Sorry, this app is in use.
</cfoutput>
</cfif>
if date diff gte 30, remove application.inuse
</cflock>
Have a login screen here, and before you log them in, do another
exclusive lock check to make sure it's ok, log them in, set
application.inUse = true.
At the bottom, do application.lastHit = now()>
So, basically, our code checks for an application var _as well as_
checks to see the last time the user hit the site. If it was more than
30 minutes ago, we 'unlock' the application.
========================================================================
===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)
Email : [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus
"My ally is the Force, and a powerful ally it is." - Yoda
> -----Original Message-----
> From: John Ho [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 28, 2003 9:41 AM
> To: CF-Talk
> Subject: cflock?
>
>
> hi all
> I have an application and I want to allow one user
> access it at a time.
> Can you show me how to it?
>
> Thanks
> John
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to
> Outlook(TM). http://calendar.yahoo.com
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Host with the leader in ColdFusion hosting.
Voted #1 ColdFusion host by CF Developers.
Offering shared and dedicated hosting options.
www.cfxhosting.com/default.cfm?redirect=10481
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4