HELP AND TIPS FOR LOCK-MECHANISM

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

HELP AND TIPS FOR LOCK-MECHANISM

masjab-2
Hello,
I hope this is the right place to post my problem...

I have a small app (TOMCAT/ORBEON/EXIST ) to create an online  
dictionary. User (admin-users) can create/edit/delete entries...

My problem is, that I need a good lock-mechanism to prevent double  
acces to files that are "to edit".

Right row the id of the entry that is clicked "edit" is written into a  
2edit.xml file in eXist and a xquery checks if it´s already in use by  
the same user...

If the same user does already edit this file (I did this because maybe  
working in different browsers...) there was an error...

If a different user tries to edit the same file an error occurs....

But I think what I want is a little bit different and maybe someone  
has some experience and can help me...

1) The user should  be able to edit more than one entry at the same  
time...maybe he wants to open more than one browser...
2) If he clicks on one file he does already edit, he should just be  
redirected to the file he wants to edit...
3) Different users should not be able to edit a file if it is in use.


Right now when I click on edit a edit.xpl gives the entryID to my  
edit.xq that should does the checks and return the entry as an  
instance to the edit.xhtml .


Please, if someone has a good idea or thinks that the way I want to do  
it is not good..feel free to tell me a better way!

THX

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: HELP AND TIPS FOR LOCK-MECHANISM

Erik Bruchez
Administrator
Since you are using eXist, I would try to use eXist for that purpose.  
The database should already handle concurrent access issues.

-Erik

On Jul 22, 2008, at 5:15 AM, Masen J wrote:

> Hello,
> I hope this is the right place to post my problem...
>
> I have a small app (TOMCAT/ORBEON/EXIST ) to create an online  
> dictionary. User (admin-users) can create/edit/delete entries...
>
> My problem is, that I need a good lock-mechanism to prevent double  
> acces to files that are "to edit".
>
> Right row the id of the entry that is clicked "edit" is written into  
> a 2edit.xml file in eXist and a xquery checks if it´s already in use  
> by the same user...
>
> If the same user does already edit this file (I did this because  
> maybe working in different browsers...) there was an error...
>
> If a different user tries to edit the same file an error occurs....
>
> But I think what I want is a little bit different and maybe someone  
> has some experience and can help me...
>
> 1) The user should  be able to edit more than one entry at the same  
> time...maybe he wants to open more than one browser...
> 2) If he clicks on one file he does already edit, he should just be  
> redirected to the file he wants to edit...
> 3) Different users should not be able to edit a file if it is in use.
>
>
> Right now when I click on edit a edit.xpl gives the entryID to my  
> edit.xq that should does the checks and return the entry as an  
> instance to the edit.xhtml .
>
>
> Please, if someone has a good idea or thinks that the way I want to  
> do it is not good..feel free to tell me a better way!
>
> THX
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws