blob: 4397992597e6963f796fd49447a4a78f47f07aad [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<!-- Run date = December 11, 2008 12:34:31 -->
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<title>Caching</title>
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.0" />
<meta name="date" content="2005-07-10T12:57:20+08:00" />
<meta name="robots" content="noarchive" />
<meta name="doctitle" content="Caching" />
<meta name="relnum" content="Release 2.1" />
<meta name="copyright" content="Copyright (c) 2000, 2008 oracle . All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: Oracle - initial API and implementation" />
<link rel="copyright" href="dcommon/html/cpyr.htm" title="Copyright" type="text/html" />
<link rel="stylesheet" href="dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" />
<!-- start-->
<!-- contents -->
</head>
<body>
<p><a id="CIABEDCH" name="CIABEDCH"></a></p>
<div class="sect3"><!-- infolevel="all" infotype="General" -->
<h1><a id="sthref226" name="sthref226"></a>Caching</h1>
<p>This table lists the properties of the Caching page of the <a href="ref_persistence_xmll_editor.htm#CIACCHID">persistence.xml Editor</a>.</p>
<div class="tblformal"><a id="sthref227" name="sthref227"></a><a id="sthref228" name="sthref228"></a>
<p class="titleintable">Properties of the Caching Page</p>
<table class="Formal" title="Properties of the Caching Page" summary="This table lists the properties of the persistence.xml&rsquo;s Caching page." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<thead>
<tr align="left" valign="top">
<th align="left" valign="bottom" id="r1c1-t22">Property</th>
<th align="left" valign="bottom" id="r1c2-t22">Description</th>
<th align="left" valign="bottom" id="r1c3-t22">Default</th>
</tr>
</thead>
<tbody>
<tr align="left" valign="top">
<td align="left" id="r2c1-t22" headers="r1c1-t22">
<p>Default Cache Type</p>
</td>
<td align="left" headers="r2c1-t22 r1c2-t22">
<p>Select one of the following as the Default Cache Type:</p>
<ul>
<li>
<p><span class="bold">Soft with Weak Subcache</span>&ndash;This option is similar to <span class="bold">Weak with Hard Subcache</span> except that it maintains a most frequently used subcache that uses soft references. The size of the subcache is proportional to the size of the identity map. The subcache uses soft references to ensure that these objects are garbage-collected only if the system is low on memory.</p>
<p>Use this identity map in most circumstances as a means to control memory used by the cache.</p>
</li>
<li>
<p><span class="bold">Week with Hard Subcache</span>&ndash;This option is similar to <span class="bold">Soft with Weak</span> subcache except that it maintains a most frequently used subcache that uses hard references. Use this identity map if soft references are not suitable for your platform.</p>
</li>
<li>
<p><span class="bold">Weak</span>&ndash;This option is similar to <span class="bold">Full</span>, except that objects are referenced using weak references. This option uses less memory than <span class="bold">Full</span>, allows complete garbage collection and provides full caching and guaranteed identity.</p>
<p>Use this identity map for transactions that, once started, stay on the server side.</p>
</li>
<li>
<p><span class="bold">Soft</span>&ndash;This option is similar to <span class="bold">Weak</span> except that the map holds the objects using soft references. This identity map enables full garbage collection when memory is low. It provides full caching and guaranteed identity.</p>
</li>
<li>
<p><span class="bold">Full</span>&ndash;This option provides full caching and guaranteed identity: all objects are cached and not removed.</p>
<p>Note: This process may be memory-intensive when many objects are read.</p>
</li>
<li>
<p><span class="bold">None</span>&ndash;This option does not preserve object identity and does not cache objects.This option is not recommended.</p>
</li>
</ul>
</td>
<td align="left" headers="r2c1-t22 r1c3-t22">
<p>Weak with hard subcache</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r3c1-t22" headers="r1c1-t22">
<p>Default Cache Size</p>
</td>
<td align="left" headers="r3c1-t22 r1c2-t22">
<p>Set the size of the cache.</p>
</td>
<td align="left" headers="r3c1-t22 r1c3-t22">
<p>100</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r4c1-t22" headers="r1c1-t22">
<p>Default Shared Cache</p>
</td>
<td align="left" headers="r4c1-t22 r1c2-t22">
<p>Specifies if cached instances should be in the shared cache or in a client isolated cache.</p>
</td>
<td align="left" headers="r4c1-t22 r1c3-t22">
<p>True</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r5c1-t22" headers="r1c1-t22">
<p>Entity Caching</p>
</td>
<td align="left" headers="r5c1-t22 r1c2-t22">
<p>Specify the entity.</p>
</td>
<td align="left" headers="r5c1-t22 r1c3-t22"><br /></td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r6c1-t22" headers="r1c1-t22">
<p>&nbsp;&nbsp;Cache Type</p>
</td>
<td align="left" headers="r6c1-t22 r1c2-t22">
<p>Select a cache type. See <span class="italic">Default Cache</span></p>
</td>
<td align="left" headers="r6c1-t22 r1c3-t22"><br /></td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r7c1-t22" headers="r1c1-t22">
<p>&nbsp;&nbsp;Cache Size</p>
</td>
<td align="left" headers="r7c1-t22 r1c2-t22">
<p>Set the size of the cache.</p>
</td>
<td align="left" headers="r7c1-t22 r1c3-t22"><br /></td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r8c1-t22" headers="r1c1-t22">
<p>&nbsp;&nbsp;Shared Cache</p>
</td>
<td align="left" headers="r8c1-t22 r1c2-t22">
<p>See <span class="italic">Default Shared Cache</span>.</p>
</td>
<td align="left" headers="r8c1-t22 r1c3-t22"><br /></td>
</tr>
</tbody>
</table>
<br /></div>
<!-- class="tblformal" -->
<div align="center">
<div class="inftblnote"><br />
<table class="Note oac_no_warn" summary="" cellpadding="3" cellspacing="0">
<tbody>
<tr>
<td align="left">
<p class="notep1">Note:</p>
This page is not available for projects using the <span class="bold">Generic</span> platform.</td>
</tr>
</tbody>
</table>
<br /></div>
<!-- class="inftblnote" --></div>
</div>
<!-- class="sect3" -->
<!-- Start Footer -->
<div class="footer">
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="left" width="86%"><a href="dcommon/html/cpyr.htm"><span class="copyrightlogo">Copyright&nbsp;&copy;&nbsp;2006, 2008,&nbsp;Oracle.&nbsp;All&nbsp;rights&nbsp;reserved.</span></a></td>
</tr>
</table>
</div>
<!-- class="footer" -->
</body>
</html>