Infinispan as Second Level JPA Cache: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 9: Line 9:
=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'>

Revision as of 23:44, 4 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>