[hibernate-dev] cache-jbosscache3 module for Hibernate Core

Manik Surtani manik at jboss.org
Tue Oct 14 05:33:30 EDT 2008


On 13 Oct 2008, at 15:18, Brian Stansberry wrote:

> Manik Surtani wrote:
>> Guys,
>> The API of JBC 3.0 is compatible with 2.x so the actual provider  
>> code should not change, but we probably want to test MVCC as a  
>> locking scheme as well.
>> So, we either
>> 1)  need a cache-jbosscache3 module (yuk!), copy the providers and  
>> existing tests from cache-jbosscache2 and add a few extra tests.
>> or,
>> 2)  assume that cache-jbosscache2 refers to an API and not a  
>> version of the cache.  So update the cache used in cache- 
>> jbosscache2 to 3.0.0, and add the extra MVCC tests as well.
>> My pref would be for 2, what do you guys think?
>
> Had a *quick* look at the code, and looks like the only direct use  
> of the JBC node locking scheme is a check for OPTIMISTIC in the JBC  
> config, which if true leads to use of classes that store versions in  
> the cache. With MVCC we don't need to store versions, so looks like  
> the existing logic is fine.

Yup.

> If the hibernate guys object to changing the dependency to 3.x, we  
> could look at handling this via a maven profile. If there's no  
> compile time dependency on JBC 3 in the main code or the tests  
> (likely, since MVCC is configured via XML) then we could isolate  
> execution of the MVCC tests in a profile.
>
> Downside to the profile approach is the standard JBC configs that  
> ship would still use PESSIMISTIC/OPTIMISTIC.

Yeah my preference, naturally, would be to bundle 3.x and ship with an  
MVCC based cfg.  This will be much better for performance and  
stability for Hibernate anyway (in terms of no deadlocks, being able  
to fail fast, etc) so I don't see any benefit to *not* doing this.

- Manik

--
Manik Surtani
Lead, JBoss Cache
manik at jboss.org







More information about the hibernate-dev mailing list