[infinispan-dev] Different configuration with Hibernate

Sanne Grinovero sanne at infinispan.org
Tue Feb 24 07:23:26 EST 2015


Interesting, so it seems it's possible to configure a specific cache
for a specific entity?

I thought this was a pending limitation of the Infinispan Cache, and
I'm afraid most other users will think it too as none of this is
mentioned in the Hibernate documentation.



On 24 February 2015 at 12:13, Dan Berindei <dan.berindei at gmail.com> wrote:
> I believe the user guide has the answer to the original question:
>
> http://infinispan.org/docs/7.0.x/user_guide/user_guide.html#_advanced_configuration_2
>
>> On top of that, this finer grained cache definition enables users to define cache settings on a per entity/collection basis. For example:
>>
>> <!-- If using JPA, add to your persistence.xml -->
>> <property name="hibernate.cache.infinispan.com.acme.Person.cfg"
>>    value="person-entity"/>
>> <property name="hibernate.cache.infinispan.com.acme.Person.addresses.cfg"
>>    value="addresses-collection"/>
>
>
> I don't think the mapping can be changed at runtime, though.
>
>
> Cheers
> Dan
>
>
> On Mon, Feb 23, 2015 at 7:23 PM, Sebastian Łaskawiec
> <sebastian.laskawiec at gmail.com> wrote:
>> Hey!
>>
>> I've noticed an interesting question on StackOverflow [1]. Is it possible to
>> have 2 (or more) caches and associate database tables to specific caches? I
>> can even imagine this question in broader perspective - is it possible to
>> decide in the runtime, which cache should be used?
>>
>> After a short discussion with Sanne we couldn't find any solution. Does
>> anyone have any idea how to achieve this or maybe we have a "New Feature
>> Request" candidate?
>>
>> Thanks
>> Sebastian
>>
>> [1]
>> http://stackoverflow.com/questions/28668971/hibernate-different-caches-for-different-tables
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev



More information about the infinispan-dev mailing list