Thanks!  This is definitely a more elegant way to handle it.

But one question... do I really have to lock the reads?  ...kidding! 
Just kidding...  ;-)

--Jeff

On 5/9/2005 3:13 PM, Matt Robertson wrote:

> I do what Adam does.  Application scope array, all reads and writes
> properly locked :-).  A user tries to hit an edit page.  The requested
> record ID is compared to a list of reserved IDs and, if the record is
> not in the array, it is added in along with user ID and 'last
> accessed' time.  Every time the user hits that page (which could be a
> form post or a link get -- i.e. they moved to a subsidiary screen
> controlling something for that page) the 'last accessed' value is
> updated.
> 
> Before any user executes the above the system first loops over the
> records in the array and determines if any of the 'last accessed'
> values have expired -- where expiration is determined as a time
> interval longer than the allowed session expiry of the application. 
> Any lock fitting this criterion is released.
> 
> Also a separate admin app allows superadmins to manually break locks,
> so if a user exits the record improperly (for example closing the
> browser) there exists a method to break the lock before it expires.
> 
> I keep meaning to write up a paper on this.  Its really cool, and a
> fairly common question.
> 

-- 
________________________________________________________
Jeff Langevin                             Web Programmer
Appalachian Mountain Club         [EMAIL PROTECTED]
5 Joy Street, Boston, MA 02108         617-523-0655 x302


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206106
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to