HELP AND TIPS FOR LOCK-MECHANISM

View: New views
2 Messages — Rating Filter:   Alert me  

HELP AND TIPS FOR LOCK-MECHANISM

by masjab :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 ops-users@... mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

Re: HELP AND TIPS FOR LOCK-MECHANISM

by Erik Bruchez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 ops-users@...  
> mailing list.
> To unsubscribe: mailto:ops-users-unsubscribe@...
> For general help: mailto:sympa@...?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 ops-users@... mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
LightInTheBox - Buy quality products at wholesale price