Skip to main content
summaryrefslogblamecommitdiffstats
blob: 391d913f21b67908a6c666920de98aa250b5694a (plain) (tree)
1
2
3
4
5



                                                                   
                                         












                                                                                                                                                                                                                                                                                                                                                                      

                 





                                                                                                                                 
                                                                                                     

































































































































                                                                                                                                                                                                                                                                                                                                                                                                                                  
<!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 = July 23, 2008 8:59:51 -->
<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.0" />
<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>Caching</h1>
<p>This table lists the properties of the Caching page of the <a href="reference018.htm#CIACCHID">persistence.xml Editor</a>.</p>
<div class="tblformal"><a id="sthref224" name="sthref224"></a><a id="sthref225" name="sthref225"></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-t20">Property</th>
<th align="left" valign="bottom" id="r1c2-t20">Description</th>
<th align="left" valign="bottom" id="r1c3-t20">Default</th>
</tr>
</thead>
<tbody>
<tr align="left" valign="top">
<td align="left" id="r2c1-t20" headers="r1c1-t20">
<p>Default Cache Type</p>
</td>
<td align="left" headers="r2c1-t20 r1c2-t20">
<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-t20 r1c3-t20">
<p>Weak with hard subcache</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r3c1-t20" headers="r1c1-t20">
<p>Default Cache Size</p>
</td>
<td align="left" headers="r3c1-t20 r1c2-t20">
<p>Set the size of the cache.</p>
</td>
<td align="left" headers="r3c1-t20 r1c3-t20">
<p>1000</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r4c1-t20" headers="r1c1-t20">
<p>Default Shared Cache</p>
</td>
<td align="left" headers="r4c1-t20 r1c2-t20">
<p>Specfies if cached instances should be in the shared cache or in a client isolated cache.</p>
</td>
<td align="left" headers="r4c1-t20 r1c3-t20"><br /></td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r5c1-t20" headers="r1c1-t20">
<p>Entity Caching</p>
</td>
<td align="left" headers="r5c1-t20 r1c2-t20">
<p>Specify the entity.</p>
</td>
<td align="left" headers="r5c1-t20 r1c3-t20"><br /></td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r6c1-t20" headers="r1c1-t20">
<p>&nbsp;&nbsp;Cache Type</p>
</td>
<td align="left" headers="r6c1-t20 r1c2-t20">
<p>Select a cache type. See <span class="italic">Default Cache</span></p>
</td>
<td align="left" headers="r6c1-t20 r1c3-t20"><br /></td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r7c1-t20" headers="r1c1-t20">
<p>&nbsp;&nbsp;Cache Size</p>
</td>
<td align="left" headers="r7c1-t20 r1c2-t20">
<p>Set the size of the cache.</p>
</td>
<td align="left" headers="r7c1-t20 r1c3-t20"><br /></td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r8c1-t20" headers="r1c1-t20">
<p>&nbsp;&nbsp;Shared Cache</p>
</td>
<td align="left" headers="r8c1-t20 r1c2-t20">
<p>See <span class="italic">Default Shared Cache</span>.</p>
</td>
<td align="left" headers="r8c1-t20 r1c3-t20"><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>

Back to the top