[jboss-jira] [JBoss JIRA] Commented: (AS7-1393) Make Infinispan default 2nd level cache provider for hibernate

Paul Ferraro (JIRA) jira-events at lists.jboss.org
Sun Jul 24 23:00:23 EDT 2011


    [ https://issues.jboss.org/browse/AS7-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616093#comment-12616093 ] 

Paul Ferraro commented on AS7-1393:
-----------------------------------

It's not causing any problem (I would have categorized this as a bug otherwise), but the current setup is not as simple as it could/should be.  I thought we already agreed that we would make Infinispan the default 2nd level cache provider, instead of the Hashtable impl.  We already include the requisite cache config in the default profile.

Even your suggestion doesn't go far enough, I think.  Here's what I'm proposing:
1. If hibernate.cache.use_second_level_cache is true, then default hibernate.cache.region.factory_class to "org.hibernate.cache.infinispan.JndiInfinispanRegionFactory".
2. If hibernate.cache.region.factory_class is "org.hibernate.cache.infinispan.JndiInfinispanRegionFactory" (whether explicit or implicit), then default hibernate.cache.infinispan.cachemanager to "java:jboss/infinispan/hibernate".

So, in the end, the user should only have to set 1 property in persistence.xml (i.e. <property name="hibernate.cache.use_second_level_cache" value="true"/>) in order to use the 2nd level cache with Infinispan.  That's what I mean by simple.

> Make Infinispan default 2nd level cache provider for hibernate
> --------------------------------------------------------------
>
>                 Key: AS7-1393
>                 URL: https://issues.jboss.org/browse/AS7-1393
>             Project: Application Server 7
>          Issue Type: Enhancement
>          Components: JPA / Hibernate
>    Affects Versions: 7.0.0.Final
>            Reporter: Paul Ferraro
>            Assignee: Scott Marlow
>             Fix For: 7.0.1.Final, 7.1.0.Alpha1
>
>
> I thought this was the already the case, but apparently it isn't yet.
> Users should not need to specify a value for hibernate.cache.region.factory_class in their persistence.xml.
> If undefined, the jpa subsystem should default the hibernate.cache.region.factory_class to "org.hibernate.cache.infinispan.JndiInfinispanRegionFactory".  Likewise, the requisite hibernate.cache.infinispan.cachemanager property should default to "java:jboss/infinispan/hibernate".

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list