Re: Locking a webapp against parallel using

2007-10-31 Thread Simon Kitching
[AARGH- I hate top-posting!] oops..when I wrote pessimistic locking, I meant optimistic locking..sorry. Mike, I'm curious about this full attribute optimistic locking you mention. I know only JPA/hibernate's version that you don't seem so keen on. In that case, just a version field is

Re: Locking a webapp against parallel using

2007-10-31 Thread Mike Kienenberger
On 10/31/07, Simon Kitching [EMAIL PROTECTED] wrote: [AARGH- I hate top-posting!] I know you hate top-posting, but I like it :-) oops..when I wrote pessimistic locking, I meant optimistic locking..sorry. Mike, I'm curious about this full attribute optimistic locking you mention. I know

Re: Locking a webapp against parallel using

2007-10-31 Thread Mario Ivankovits
Hi! Is it possible to describe full attribute optimistic locking in a couple of sentences, or should I look at the cayenne docs? (A quick google didn't show anything obviously related..) Sure. Instead of creating and locking on a special version field, lock on all fields (or all

[OT] Re: Locking a webapp against parallel using

2007-10-31 Thread Mike Kienenberger
On 10/31/07, Mario Ivankovits [EMAIL PROTECTED] wrote: Hi! Is it possible to describe full attribute optimistic locking in a couple of sentences, or should I look at the cayenne docs? (A quick google didn't show anything obviously related..) Sure. Instead of creating and locking

Re: [OT] Re: Locking a webapp against parallel using

2007-10-31 Thread Mario Ivankovits
Mike Kienenberger schrieb: Beware, (especially with the or all that are important thing) this might allow to become your entity out of sync. Means, your entity is a mixture of Well, we're getting a bit off topic, but there's nothing to beware of here. If you lock on all columns which

Re: Locking a webapp against parallel using

2007-10-30 Thread Simon Kitching
ULA UVULA [EMAIL PROTECTED] schrieb: I have written a jsf application which is maintaining a java data structure (bean). (BTW: I never have written any jsp pages, I direct starting with jsf). Is there any way to inform the users that another user is already manipulating this

RE: Locking a webapp against parallel using

2007-10-30 Thread Mark Millman
] Sent: Monday, October 29, 2007 2:42 PM To: 'MyFaces Discussion' Subject: RE: Locking a webapp against parallel using You might create an Application Scoped bean with a lock property. Setting and releasing that lock will have to by synchronized. For example, create a class as follows: public class

RE: Locking a webapp against parallel using

2007-10-30 Thread Mark Millman
-scopeapplication/managed-bean-scope /managed-bean [EMAIL PROTECTED] -Original Message- From: ULA UVULA [mailto:[EMAIL PROTECTED] Sent: Monday, October 29, 2007 2:03 PM To: users@myfaces.apache.org Subject: Locking a webapp against parallel using Hi, I'm a newbie. Can somebody can give me

Re: Locking a webapp against parallel using

2007-10-30 Thread Mike Kienenberger
Well, if your ORM supports optimistic locking, then it's far simpler. You don't have to worry about session timeouts or deadlocks since there's no lock to clean up.The commit sql fails if someone else changes it first, and you can also write a recovery procedure if you want to try to handle

Locking a webapp against parallel using

2007-10-29 Thread ULA UVULA
Hi, I'm a newbie. Can somebody can give me a hint? I have written a jsf application which is maintaining a java data structure (bean). (BTW: I never have written any jsp pages, I direct starting with jsf). Is there any way to inform the users that another user is already manipulating this

Re: Locking a webapp against parallel using

2007-10-29 Thread Andrew Robinson
Are you using direct JDBC or a OO data technology like EJB3 or Hibernate? Hibernate does have object locking and you could probably use that. As for users that leave without logging out, you could implement a standard servlet session listener and listen for session expirations and unlock any