Infinispan as Second Level JPA Cache: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:


* http://infinispan.org/docs/8.2.x/user_guide/user_guide.html#jpa_cache_store
* http://infinispan.org/docs/8.2.x/user_guide/user_guide.html#jpa_cache_store
* Configure Infinispan as a 2nd Level Cache for JPA/Hibernate in EAP https://access.redhat.com/solutions/656273


=Internal=
=Internal=
Line 9: Line 10:
=Overview=
=Overview=


EAP deployments expose a pre-configured cache container named "hibernate", that is offered as second-level JPA cache for use by applications:
EAP deployments expose a pre-configured cache container named "hibernate", that is offered as second-level JPA cache for use by applications. The "hibernate" cache-container is a part of the entire EAP clustering stack,  All servers in the cluster are expected to be identical from the point of view of applications deployed, the application types are expected to be available on all cluster nodes.
 
=Example=


<syntaxhighlight lang='xml'>
<syntaxhighlight lang='xml'>

Latest revision as of 20:07, 21 August 2017

External

Internal

Overview

EAP deployments expose a pre-configured cache container named "hibernate", that is offered as second-level JPA cache for use by applications. The "hibernate" cache-container is a part of the entire EAP clustering stack, All servers in the cluster are expected to be identical from the point of view of applications deployed, the application types are expected to be available on all cluster nodes.

Example

<subsystem xmlns="urn:jboss:domain:infinispan:1.5">
    <cache-container name="hibernate" default-cache="local-query" module="org.jboss.as.jpa.hibernate:4">
        <transport lock-timeout="60000"/>
        <local-cache name="local-query">
            <transaction mode="NONE"/>
            <eviction strategy="LRU" max-entries="10000"/>
            <expiration max-idle="100000"/>
        </local-cache>
        <invalidation-cache name="entity" mode="SYNC">
            <transaction mode="NON_XA"/>
            <eviction strategy="LRU" max-entries="10000"/>
            <expiration max-idle="100000"/>
        </invalidation-cache>
        <replicated-cache name="timestamps" mode="ASYNC">
            <transaction mode="NONE"/>
            <eviction strategy="NONE"/>
        </replicated-cache>
    </cache-container>
</subsystem>