Sorry guru for the [silly] question: I am having a discussion with people in my project regarding the container work with CMP entity beans. More specifically, we want to implement a Numerator table to assign numbers to several entities of our model.
Suppose a client wants to assign a value to a peopleId field in a People table, then it will in order: 1) Access the Numerator table (behind a CMP entity bean) 2) Retrieve the value from the number field; 3) Assign that value to peopleId 4) Increment the value by 1 What I am saying to the guys in the project is that the container (Jboss in our case) could ensure that, from the moment when the number is retrieved to the moment when the number is incremented by 1 nobody else will be able to alter the value of the number field in the Numerator table. Someone is replying that we should implement a synchronized method. Is that really necessary? I'm quite sure that there is a way to instruct the container to 'lock' in a certain sense the value of the number field. One way could be a transaction (shall we use synchronization in this case?); is there anything simplier? Many thanks for your time, Marco ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
