| All, I just pushed the initial work on this to the 6.0 branch. Unless I hear otherwise I consider this pretty much done from a design perspective although there are 2 things I wanted to point out in particular. First, when you look at the org.hibernate.cache.spi.RegionFactory#buildDomainDataRegion and the various methods on org.hibernate.cache.spi.DomainDataRegion bear in mind that the assumption here is that the RegionFactory has already built all of the configured entity, natural-id and collection cache access objects that can be looked up later. The later look up does not give enough information to build the access. Alternatively the built DomainDataRegion could simply cache the config objects and use them later to build the access as requested. For the approach of pre-building all of the access objects, I have provided a org.hibernate.cache.spi.AbstractDomainDataRegion base class to help. The other thing I wanted to point out is regarding region names. Previously it was unclear who exactly was responsible for qualifying (cache_region_prefix) the name and when. What I would like to make sure of is that by the time we make any calls of the cache provider the region names we might pass it are always qualified. To that end I am contemplating add a org.hibernate.cache.spi.Region.Name object that we would pass along. In fact I already added that contract, I have just not used it anywhere. Basically the idea is the same as javax.naming.CompositeName... a tuple of (qualifier,configuredName). Passing Strings always makes this unclear and error-prone imo but I wanted to get everyone else's take... |