Added tutorials of the hibernate-release 4.3.9.Final as integration-tests
[hibernate4-maven-plugin] / src / it / tutorials / osgi / unmanaged-native / src / main / resources / ehcache.xml
1 <!--
2   ~ Hibernate, Relational Persistence for Idiomatic Java
3   ~
4   ~ Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
5   ~ indicated by the @author tags or express copyright attribution
6   ~ statements applied by the authors. All third-party contributions are
7   ~ distributed under license by Red Hat Middleware LLC.
8   ~
9   ~ This copyrighted material is made available to anyone wishing to use, modify,
10   ~ copy, or redistribute it subject to the terms and conditions of the GNU
11   ~ Lesser General Public License, as published by the Free Software Foundation.
12   ~
13   ~ This program is distributed in the hope that it will be useful,
14   ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15   ~ or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
16   ~ for more details.
17   ~
18   ~ You should have received a copy of the GNU Lesser General Public License
19   ~ along with this distribution; if not, write to:
20   ~ Free Software Foundation, Inc.
21   ~ 51 Franklin Street, Fifth Floor
22   ~ Boston, MA  02110-1301  USA
23   -->
24 <ehcache>
25
26     <!-- Sets the path to the directory where cache .data files are created.
27
28          If the path is a Java System Property it is replaced by
29          its value in the running VM.
30
31          The following properties are translated:
32          user.home - User's home directory
33          user.dir - User's current working directory
34          java.io.tmpdir - Default temp file path -->
35     <diskStore path="./target/tmp"/>
36
37
38     <!--Default Cache configuration. These will applied to caches programmatically created through
39         the CacheManager.
40
41         The following attributes are required for defaultCache:
42
43         maxInMemory       - Sets the maximum number of objects that will be created in memory
44         eternal           - Sets whether elements are eternal. If eternal,  timeouts are ignored and the element
45                             is never expired.
46         timeToIdleSeconds - Sets the time to idle for an element before it expires. Is only used
47                             if the element is not eternal. Idle time is now - last accessed time
48         timeToLiveSeconds - Sets the time to live for an element before it expires. Is only used
49                             if the element is not eternal. TTL is now - creation time
50         overflowToDisk    - Sets whether elements can overflow to disk when the in-memory cache
51                             has reached the maxInMemory limit.
52
53         -->
54     <defaultCache
55         maxElementsInMemory="10000"
56         eternal="false"
57         timeToIdleSeconds="120"
58         timeToLiveSeconds="120"
59         overflowToDisk="true"
60         />
61
62     <!--Predefined caches.  Add your cache configuration settings here.
63         If you do not have a configuration for your cache a WARNING will be issued when the
64         CacheManager starts
65
66         The following attributes are required for defaultCache:
67
68         name              - Sets the name of the cache. This is used to identify the cache. It must be unique.
69         maxInMemory       - Sets the maximum number of objects that will be created in memory
70         eternal           - Sets whether elements are eternal. If eternal,  timeouts are ignored and the element
71                             is never expired.
72         timeToIdleSeconds - Sets the time to idle for an element before it expires. Is only used
73                             if the element is not eternal. Idle time is now - last accessed time
74         timeToLiveSeconds - Sets the time to live for an element before it expires. Is only used
75                             if the element is not eternal. TTL is now - creation time
76         overflowToDisk    - Sets whether elements can overflow to disk when the in-memory cache
77                             has reached the maxInMemory limit.
78
79         -->
80
81     <!-- Sample cache named sampleCache1
82         This cache contains a maximum in memory of 10000 elements, and will expire
83         an element if it is idle for more than 5 minutes and lives for more than
84         10 minutes.
85
86         If there are more than 10000 elements it will overflow to the
87         disk cache, which in this configuration will go to wherever java.io.tmp is
88         defined on your system. On a standard Linux system this will be /tmp"
89         -->
90     <cache name="sampleCache1"
91         maxElementsInMemory="10000"
92         eternal="false"
93         timeToIdleSeconds="300"
94         timeToLiveSeconds="600"
95         overflowToDisk="true"
96         />
97
98     <!-- Sample cache named sampleCache2
99         This cache contains 1000 elements. Elements will always be held in memory.
100         They are not expired. -->
101     <cache name="sampleCache2"
102         maxElementsInMemory="1000"
103         eternal="true"
104         timeToIdleSeconds="0"
105         timeToLiveSeconds="0"
106         overflowToDisk="false"
107         /> -->
108
109     <!-- Place configuration for your caches following -->
110
111 </ehcache>