Hello, I need a little help.
My Web Services system has an applet running in the background, but I cannot assume that everyone will have Java enabled.
I need a reliable way to implement a locking mechanism (which will consist of calling lock and unlock functions of my middleware layer).
I am not very experienced in PHP, and I need to do this on the page level. I cannot use sessions, because I need only to lock on certain specific pages, to allow maximum availability of the system from multiple users.
Can anyone suggest a way for me to accomplish this?
Thank you,
Nemesis.
Help with locking mechanism via web page
Moderator: General Moderators
Yes, this is a solution that I had hoped would work.....sorry if I was not specific enough,
The problem is that I need to call an unlock function if the user navigated to an unlocked page.
So I need a way to call a function when the page is changed, when the page is closed, when the browser is closed, etc.
And this needs to be reliable, otherwise I will end up with eternally locked objects (until I unlock them manually
)
The problem is that I need to call an unlock function if the user navigated to an unlocked page.
So I need a way to call a function when the page is changed, when the page is closed, when the browser is closed, etc.
And this needs to be reliable, otherwise I will end up with eternally locked objects (until I unlock them manually
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
okay. database sessions are the direction to go. Is this lock system wide? It would appear so. If you can change it to a friendly session level lock or request based lock it would probably be easier and more reliable to implement. You'll need sessions to know if they have navigated away/closed the browser after a period of inactivity.
When the database session is removed, the last page they were on should be checked against the lock list and call unlock when needed.. or better yet just always call unlock.
When the database session is removed, the last page they were on should be checked against the lock list and call unlock when needed.. or better yet just always call unlock.