-----Original Message-----
From: BOUTTE Sebastien [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 03, 2002 1:57 PM
To: [EMAIL PROTECTED]
Subject: Concurrent record updateHi,I have some questions about blocking concurrent update with multiple clients.I have the following schema of transaction :User A User B1. SELECT * FROM TEST2. SELECT * FROM TEST3. UPDATE TEST SET .... WHERE TEST_ID = n4. UPDATE TEST SET ..... WHERE TEST_ID = nIn this schema, two users are updating the same record but update from B is lost ....How can i do that in my SessionBean, to throw an exception for user A when he tries toupdate the record ?I have read some articles about database isolation level and transaction level in EJB worldbut i don't see how to apply them to my case.Thanks for your helpSebastien
Ce message est prot�g� par les r�gles relatives au secret des correspondances ; il peut en outre contenir des informations � caract�re confidentiel ou prot�g�es par diff�rentes r�gles et notamment le secret des affaires ; il est �tabli � destination exclusive de son destinataire. Toute divulgation, utilisation, diffusion ou reproduction (totale ou partielle) de ce message, ou des informations qu'il contient, doit �tre pr�alablement autoris�e. Tout message �lectronique est susceptible d'alt�ration et son int�grit� ne peut �tre assur�e. WFinance et WFinance Conseil d�clinent toute responsabilit� au titre de ce message s'il a �t� modifi� ou falsifi�. Si vous n'�tes pas destinataire de ce message, merci de le d�truire imm�diatement et d'avertir l'exp�diteur de l'erreur de distribution et de la destruction du message.
This message is protected by the secrecy of correspondence rules ; furthermore it may contain privileged or confidential information that is protected by law, notably by the secrecy of business relations rule ; it is intended solely for the attention of the addressee . Any disclosure, use, dissemination or reproduction (either whole or partial) of this message or the information contained herein is strictly prohibited without prior consent. Any electronic message is susceptible to alteration and its integrity can not be assured. WFinance and WFinance Conseil declines any responsibility for this message in the event of alteration or falsification.. If you are not the intended recipient, please destroy it immediately and notify the sender of the wrong delivery and the mail deletion.
Sebastien:
You need some way of avoiding what is called a "Stale
Update", a very generic requirement for an enterprise application. Read up the
"EJB Design Patterns" book. It is freely available in pdf form from www.theserverside.com. Inside this book,
there is a chapter dedicated to such problems.
Regards
Sanjeev
- Concurrent record update BOUTTE Sebastien
- Re: Concurrent record update Ashwani Kalra
- Re: Concurrent record update Juan Pablo Lorandi
- Re: Concurrent record update Sanjeev Verma
- Re: Concurrent record update Juan Pablo Lorandi
- Re: Concurrent record update Ramakrishna N
- Re: Concurrent record update Juan Pablo Lorandi
- Re: Concurrent record update Juan Pablo Lorandi
- Re: Concurrent record update BOUTTE Sebastien
