Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Last active May 22, 2016 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhirockzz/581d4b2052760dbd6c1250d7e702bc2a to your computer and use it in GitHub Desktop.
Save abhirockzz/581d4b2052760dbd6c1250d7e702bc2a to your computer and use it in GitHub Desktop.
A JPA persistence.xml demonstrating usage of L2 caching config parameter
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="jap-punitxml-testPU" transaction-type="JTA">
<exclude-unlisted-classes>false</exclude-unlisted-classes>
...............
<shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
<properties>
<property name="javax.persistence.query.timeout" value="3000"/>
<property name="javax.persistence.lock.timeout" value="2000"/>
</properties>
...............
</persistence-unit>
</persistence>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment