Of course this all assumes that "locking" something is a good idea at
all from a usability / scalability pov. There are rare occasions where
it's needed but I'm skeptical nonetheless...

At the very "best" you could do some kind of comet approach to letting
the user know someone else is beginning (or is) also editing
something. (like gmail showing that yellow box when someone else is
replying to the same email thread) It's a big can of worms.

On 2/19/07, James Carman <[EMAIL PROTECTED]> wrote:
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]




--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to