Damn, I just wrote basically the exact same email, then saw this before I 
sent it. On your mark, get set, go. And the winner is Raymonnnnnddddd ;)

Brook

At 10:47 AM 5/28/2003 -0500, you wrote:
>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

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to