Use EHCache for second-level caching.
[pithos] / persistence / META-INF / persistence.xml
1 <persistence
2         xmlns="http://java.sun.com/xml/ns/persistence"
3         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4         xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
5         version="1.0">
6         <persistence-unit name="gss">
7                 <jta-data-source>java:/gssdb</jta-data-source>
8                 <properties>
9                         <property name="hibernate.hbm2ddl.auto" value="update"/>
10                         <property name="hibernate.show_sql" value="false"/>
11                         <property name="hibernate.format_sql" value="false"/>
12                         <property name="hibernate.use_sql_comments" value="false"/>
13             <property name="hibernate.cache.use_second_level_cache" value="true"/>
14             <property name="hibernate.cache.use_query_cache" value="true"/>
15             <property name="hibernate.cache.region.factory_class" value="net.sf.ehcache.hibernate.SingletonEhCacheRegionFactory"/>
16             <property name="net.sf.ehcache.configurationResourceName" value="ehcache.xml"/>            
17                 </properties>
18         </persistence-unit>
19 </persistence>