[jboss-user] [EJB 3.0] - Re: Several clients connecting to an EJB application in JBos

martin ganserer do-not-reply at jboss.com
Wed Mar 21 04:49:30 EDT 2007


I don't think that the EJB3 lock strategies can help you further especially when working with rich clients! It's up to you to implement it by yourself!
I had the same problem too and I solved it in a very easy way:
In our last project we had one entity that was in danger of being changed by different users at the same time. As the client was a SWING tool, very long transactions could occur! We added two attributes to this entity. One that holds the lock date and another that 
references the user which locked the row (= entity). If one user selects the "row" for update the lock date and the user will be saved in the fields. If another user wants to open the recordset for update he will get a message that the row is locked.

Hope that this helps you!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030139#4030139

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030139

More information about the jboss-user mailing list