Woo-hoo! I win!

> -----Original Message-----
> From: Robertson-Ravo, Neil (REC)
> [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 16, 2002 10:48 AM
> To: CF-Talk
> Subject: RE: 'Locking' a process
> 
> 
> cheers Rich, I did think of this, but the files has no 
> reference in the DB -
> it doesnt need one for this... I think writing a lock file 
> (XXXX.lck) is the
> way to go :-)
> 
> 
> 
> -----Original Message-----
> From: Rich Wild [mailto:[EMAIL PROTECTED]]
> Sent: 16 October 2002 15:26
> To: CF-Talk
> Subject: RE: 'Locking' a process
> 
> 
> sounds like he's got an xml file open for editing though. I think he's
> talking about locking it so that noone else can go into the 
> file and edit it
> at the same time (ie implementing a client side lock not a 
> server side lock)
> 
> I guess you could flick a bit column between 1 and 0. If a user starts
> editing the file, hit the db and set the column to 1 (meaning 
> the file is
> locked). Everytime someone else hits the page, check the db 
> to see if the
> file is locked. If it is, don't allow them to open the file.
> 
> Once the first user has finished and saves the changes, flick 
> the bit column
> back to 0 to allow others read/write access.
> 
> Also, you may want to create some sort of maximum lock time 
> (as users may
> start editing a file and never finish, thus locking everyone else out
> forever)
> 
> To do this, create a timestamp of the current time when a user starts
> editing the file and have a scheduled job running on your db 
> to re-unlock
> the file after a set period of time etc... Obviously there's 
> a little bit
> more thought required to it than that, but you get the idea.
> 
> > -----Original Message-----
> > From: Greg Bullough [mailto:[EMAIL PROTECTED]]
> > Sent: 16 October 2002 15:29
> > To: CF-Talk
> > Subject: Re: 'Locking' a process
> > 
> > 
> > How about doing CFLOCK and using a named lock?
> > 
> > Greg
> > 
> > At 03:15 PM 10/16/02 +0100, you wrote:
> > >Anyone got any ideas on how to do a pseudo lock on a process 
> > within an
> > >application?
> > >
> > >My example is that I am reading from an .xml file whose 
> > contents can be
> > >edited and then updated.  I want to be able to lock this 
> > process so no other
> > >user can overwrite the data while another user is performing 
> > the action on
> > >it (or at least flag the fact that its open by another process.)
> > >.
> > >
> > >Neil
> > >
> > 
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm


Reply via email to