This content has been marked as final.
Show 5 replies
-
1. Re: SELECT FOR UPDATE semantics
manik Jan 5, 2007 10:20 AM (in response to brian.stansberry)Is the options api the best/cleanest way to do this?
Like you said, as it only applies to pessimistic locking, it does seem fairly straightforward to implement.
Is there a JIRA task for this? -
2. Re: SELECT FOR UPDATE semantics
brian.stansberry Jan 5, 2007 10:49 AM (in response to brian.stansberry)"manik.surtani@jboss.com" wrote:
Is the options api the best/cleanest way to do this?
Not sure about best. It perturbs things the least. The alternative I can think of would be to add a method to Cache. But then all the interceptors that check for "get" calls would have to have that method(s) added. And a target method would have to be added to CacheImpl. With the Option, everyone is blissfully unaware except for PessimisticLockInterceptor.Like you said, as it only applies to pessimistic locking, it does seem fairly straightforward to implement.
Yeah, I took a look at the interceptor yesterday to check for any gotcha, and it took me about 10 mins to add it w/ a simple 3-4 statement if block. Didn't test at all though.Is there a JIRA task for this?
No, I wanted to check on the forum first whether people thought the whole concept was off. If you think its a useful feature, I'll open one. Deciding exactly how to implement, timing, etc can come later. -
3. Re: SELECT FOR UPDATE semantics
manik Jan 5, 2007 11:21 AM (in response to brian.stansberry)
No, I wanted to check on the forum first whether people thought the whole concept was off. If you think its a useful feature, I'll open one. Deciding exactly how to implement, timing, etc can come later.
Useful enough, I guess, given the requests we've had for it. I'd implement it as an option for now, and upgrade it to a full API feature in 2.2.0/3.0.0 timeframe if enough usage warrants it.
Found a JIRA task for it though: JBCACHE-629 -
4. Re: SELECT FOR UPDATE semantics
brian.stansberry Jan 5, 2007 12:32 PM (in response to brian.stansberry)Geez, my search skills need a serious upgrade. :(
-
5. Re: SELECT FOR UPDATE semantics
manik Jan 10, 2007 12:48 PM (in response to brian.stansberry)Fixed in CVS HEAD, will be in BETA1.
See o.j.c.options.ForceWriteLockTest for usage details.