Just use the session id and set up an HttpSessionListener to remove user's locks when their session expires.
On 2/19/07, Luis Rodrigo Gallardo Cruz <[EMAIL PROTECTED]> wrote:
On Mon, Feb 19, 2007 at 08:17:02PM -0500, James Carman wrote: > I would say just put a property on the object that says that it has > been "checked out" or something. That way, you can tell a user that > tries to edit it that they can't because "so and so has this record > checked out and is editing it." One has to be careful with this approach, because the checkout must, somehow, expire, otherwise you risk leaving an object permanently uneditable if a client gets disconected/forgotten/whatever. Just throwing random ideas about: How about making the 'checked-out' property a weak hash, pointing to the editing user's session (or some attribute within)? I assume the J2EE container will GC expired sessions, thus automatically expiring the object's check-out. -- Rodrigo Gallardo GPG-Fingerprint: 7C81 E60C 442E 8FBC D975 2F49 0199 8318 ADC9 BC28 Zenophobia: the irrational fear of convergent sequences. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFF2k6xAZmDGK3JvCgRAnMJAJ9TFHFOmAlciwoY2kQO+rYdMBcvxgCffRk0 tl1+WX/ZP82yNXrwuELwhcA= =x6eX -----END PGP SIGNATURE-----
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]