blob: eebb3ff29a8d3d0b43c291a7a7c0e2ed67499c90 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_222) on Tue Dec 08 12:28:22 UTC 2020 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ConnectionPolicy (EclipseLink 3.0.0, API Reference)</title>
<meta name="date" content="2020-12-08">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ConnectionPolicy (EclipseLink 3.0.0, API Reference)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">EclipseLink 3.0.0, API Reference</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/eclipse/persistence/sessions/server/ClientSession.html" title="class in org.eclipse.persistence.sessions.server"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.ExclusiveMode.html" title="enum in org.eclipse.persistence.sessions.server"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/eclipse/persistence/sessions/server/ConnectionPolicy.html" target="_top">Frames</a></li>
<li><a href="ConnectionPolicy.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.eclipse.persistence.sessions.server</div>
<h2 title="Class ConnectionPolicy" class="title">Class ConnectionPolicy</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.eclipse.persistence.sessions.server.ConnectionPolicy</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">ConnectionPolicy</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre>
<div class="block"><p>
<b>Purpose</b>: Used to specify how a client session's should be allocated.
<p>
<b>Description</b>: The ConnectionPolicy is used to indicate how a client
session will interact with the internal or external JDBC connection pool/data
source. The default ConnectionPolicy is held on the ServerSession but this
can be overridden for any specific client session when it is acquired.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/sessions/server/ServerSession.html#getDefaultConnectionPolicy--"><code>ServerSession.getDefaultConnectionPolicy()</code></a>,
<a href="../../../../../org/eclipse/persistence/sessions/server/ServerSession.html#acquireClientSession-org.eclipse.persistence.sessions.server.ConnectionPolicy-"><code>ServerSession.acquireClientSession(ConnectionPolicy)</code></a>,
<a href="../../../../../org/eclipse/persistence/sessions/server/ServerSession.html#acquireClientSession-org.eclipse.persistence.sessions.server.ConnectionPolicy-java.util.Map-"><code>ServerSession.acquireClientSession(ConnectionPolicy, Map)</code></a>,
<a href="../../../../../org/eclipse/persistence/sessions/server/ClientSession.html#getConnectionPolicy--"><code>ClientSession.getConnectionPolicy()</code></a>,
<a href="../../../../../serialized-form.html#org.eclipse.persistence.sessions.server.ConnectionPolicy">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.ExclusiveMode.html" title="enum in org.eclipse.persistence.sessions.server">ConnectionPolicy.ExclusiveMode</a></span></code>
<div class="block">Default value Transactional causes creation of ClientSession,
the other two values - ExclusiveIsolatedClientSession.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.ExclusiveMode.html" title="enum in org.eclipse.persistence.sessions.server">ConnectionPolicy.ExclusiveMode</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#exclusiveMode">exclusiveMode</a></span></code>
<div class="block">This attribute is used by the ServerSession to determine if a client
session with an exclusive connection should be built and how the exclusive
connection should be used.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#isLazy">isLazy</a></span></code>
<div class="block">Determines if the write/exclusive connection is acquired only when first
requested (lazy, this is the default) or immediately when the client
session is acquired.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../org/eclipse/persistence/sessions/Login.html" title="interface in org.eclipse.persistence.sessions">Login</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#login">login</a></span></code>
<div class="block">The login information used to create a JDBC connection or acquire one
from an external pool/data-source.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#poolName">poolName</a></span></code>
<div class="block">Name of the pool to be used.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#properties">properties</a></span></code>
<div class="block">This attribute will provide a mechanism by which customers will be able
to pass connection information to events to enable further customization.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#ConnectionPolicy--">ConnectionPolicy</a></span>()</code>
<div class="block">PUBLIC:
A connection policy is used to define how the client session connection should be acquired.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#ConnectionPolicy-org.eclipse.persistence.sessions.Login-">ConnectionPolicy</a></span>(<a href="../../../../../org/eclipse/persistence/sessions/Login.html" title="interface in org.eclipse.persistence.sessions">Login</a>&nbsp;login)</code>
<div class="block">PUBLIC:
A connection policy is used to define how the client session connection should be acquired.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#ConnectionPolicy-java.lang.String-">ConnectionPolicy</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;poolName)</code>
<div class="block">PUBLIC:
A connection policy is used to define how the client session connection should be acquired.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#clone--">clone</a></span>()</code>
<div class="block">INTERNAL:
Clone the query</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#dontUseLazyConnection--">dontUseLazyConnection</a></span>()</code>
<div class="block">PUBLIC:
A lazy connection only acquires a physical connection
when a transaction is started and releases the connection when the transaction completes.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.ExclusiveMode.html" title="enum in org.eclipse.persistence.sessions.server">ConnectionPolicy.ExclusiveMode</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#getExclusiveMode--">getExclusiveMode</a></span>()</code>
<div class="block">PUBLIC:
Returns exclusive mode.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/eclipse/persistence/sessions/Login.html" title="interface in org.eclipse.persistence.sessions">Login</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#getLogin--">getLogin</a></span>()</code>
<div class="block">PUBLIC:
Return the login to use for this connection.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#getPoolName--">getPoolName</a></span>()</code>
<div class="block">PUBLIC:
Return the pool name or null if not part of a pool.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#getProperties--">getProperties</a></span>()</code>
<div class="block">ADVANCED:
This method will return the collection of custom properties set on the Connection
policy.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#getProperty-java.lang.Object-">getProperty</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</code>
<div class="block">PUBLIC:
Returns the property associated with the corresponding key.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#hasLogin--">hasLogin</a></span>()</code>
<div class="block">PUBLIC:
Return if a login is used, only one of login and pool can be used.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#hasProperties--">hasProperties</a></span>()</code>
<div class="block">PUBLIC:
Returns true if properties are available on the Connection Policy</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#isExclusive--">isExclusive</a></span>()</code>
<div class="block">PUBLIC:
Indicates whether ExclusiveIsolatedClientSession should be created.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#isExclusiveAlways--">isExclusiveAlways</a></span>()</code>
<div class="block">PUBLIC:
Indicates whether exclusiveMode is Always.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#isExclusiveIsolated--">isExclusiveIsolated</a></span>()</code>
<div class="block">PUBLIC:
Indicates whether exclusiveMode is Isolated.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#isLazy--">isLazy</a></span>()</code>
<div class="block">PUBLIC:
Return if a lazy connection should be used, a lazy connection only acquire a physical connection
when a transaction is started and releases the connection when the transaction completes.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#isPooled--">isPooled</a></span>()</code>
<div class="block">INTERNAL:
Return if part of a connection pool.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#isUserDefinedConnection--">isUserDefinedConnection</a></span>()</code>
<div class="block">INTERNAL:
Return if part of a connection pool.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#removeProperty-java.lang.Object-">removeProperty</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;key)</code>
<div class="block">PUBLIC:
This method is used to remove a custom property from the Connection Policy.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#setExclusiveMode-org.eclipse.persistence.sessions.server.ConnectionPolicy.ExclusiveMode-">setExclusiveMode</a></span>(<a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.ExclusiveMode.html" title="enum in org.eclipse.persistence.sessions.server">ConnectionPolicy.ExclusiveMode</a>&nbsp;exclusiveMode)</code>
<div class="block">PUBLIC:
Sets exclusive mode, if null is passed sets the default value.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#setIsLazy-boolean-">setIsLazy</a></span>(boolean&nbsp;isLazy)</code>
<div class="block">PUBLIC:
Set if a lazy connection should be used, a lazy connection only acquire a physical connection
when a transaction is started and releases the connection when the transaction completes.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#setLogin-org.eclipse.persistence.sessions.Login-">setLogin</a></span>(<a href="../../../../../org/eclipse/persistence/sessions/Login.html" title="interface in org.eclipse.persistence.sessions">Login</a>&nbsp;login)</code>
<div class="block">PUBLIC:
Set the login to use for this connection.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#setPoolName-java.lang.String-">setPoolName</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;poolName)</code>
<div class="block">PUBLIC:
Set the pool name or null if not part of a pool.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#setProperty-java.lang.Object-java.lang.Object-">setProperty</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;key,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;property)</code>
<div class="block">PUBLIC:
Use this method to set custom properties on the Connection Policy.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#toString--">toString</a></span>()</code>
<div class="block">INTERNAL:
return a string representation of this ConnectionPolicy</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.html#useLazyConnection--">useLazyConnection</a></span>()</code>
<div class="block">PUBLIC:
A lazy connection only acquires a physical connection
when a transaction is started and releases the connection when the transaction completes.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="login">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>login</h4>
<pre>protected&nbsp;<a href="../../../../../org/eclipse/persistence/sessions/Login.html" title="interface in org.eclipse.persistence.sessions">Login</a> login</pre>
<div class="block">The login information used to create a JDBC connection or acquire one
from an external pool/data-source. Typically this is constant within a
single persistence unit but in some advanced usages users can customize
connections for each client session.</div>
</li>
</ul>
<a name="poolName">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>poolName</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> poolName</pre>
<div class="block">Name of the pool to be used.
If neither pool name nor login provided then default pool will be used.
If no pool name is provided but there's a login then the login is used to
create connection which the ClientSession will use.</div>
</li>
</ul>
<a name="isLazy">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isLazy</h4>
<pre>protected&nbsp;boolean isLazy</pre>
<div class="block">Determines if the write/exclusive connection is acquired only when first
requested (lazy, this is the default) or immediately when the client
session is acquired.
After write/exclusive connection is acquired
if isLazy is true and exclusiveMode is Transactional
then it's held until transaction is committed or rolled back,
otherwise until the client session is released.</div>
</li>
</ul>
<a name="exclusiveMode">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>exclusiveMode</h4>
<pre>protected&nbsp;<a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.ExclusiveMode.html" title="enum in org.eclipse.persistence.sessions.server">ConnectionPolicy.ExclusiveMode</a> exclusiveMode</pre>
<div class="block">This attribute is used by the ServerSession to determine if a client
session with an exclusive connection should be built and how the exclusive
connection should be used.</div>
</li>
</ul>
<a name="properties">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>properties</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a> properties</pre>
<div class="block">This attribute will provide a mechanism by which customers will be able
to pass connection information to events to enable further customization.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="ConnectionPolicy--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ConnectionPolicy</h4>
<pre>public&nbsp;ConnectionPolicy()</pre>
<div class="block">PUBLIC:
A connection policy is used to define how the client session connection should be acquired.</div>
</li>
</ul>
<a name="ConnectionPolicy-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ConnectionPolicy</h4>
<pre>public&nbsp;ConnectionPolicy(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;poolName)</pre>
<div class="block">PUBLIC:
A connection policy is used to define how the client session connection should be acquired.</div>
</li>
</ul>
<a name="ConnectionPolicy-org.eclipse.persistence.sessions.Login-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ConnectionPolicy</h4>
<pre>public&nbsp;ConnectionPolicy(<a href="../../../../../org/eclipse/persistence/sessions/Login.html" title="interface in org.eclipse.persistence.sessions">Login</a>&nbsp;login)</pre>
<div class="block">PUBLIC:
A connection policy is used to define how the client session connection should be acquired.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="clone--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clone</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;clone()</pre>
<div class="block">INTERNAL:
Clone the query</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
</dl>
</li>
</ul>
<a name="dontUseLazyConnection--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dontUseLazyConnection</h4>
<pre>public&nbsp;void&nbsp;dontUseLazyConnection()</pre>
<div class="block">PUBLIC:
A lazy connection only acquires a physical connection
when a transaction is started and releases the connection when the transaction completes.</div>
</li>
</ul>
<a name="getLogin--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLogin</h4>
<pre>public&nbsp;<a href="../../../../../org/eclipse/persistence/sessions/Login.html" title="interface in org.eclipse.persistence.sessions">Login</a>&nbsp;getLogin()</pre>
<div class="block">PUBLIC:
Return the login to use for this connection.
Client sessions support using a separate user login for database modification.</div>
</li>
</ul>
<a name="getPoolName--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPoolName</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getPoolName()</pre>
<div class="block">PUBLIC:
Return the pool name or null if not part of a pool.</div>
</li>
</ul>
<a name="getProperties--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProperties</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&nbsp;getProperties()</pre>
<div class="block">ADVANCED:
This method will return the collection of custom properties set on the Connection
policy. Note that this will cause the lazy initialization of the HashMap.</div>
</li>
</ul>
<a name="getProperty-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProperty</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;getProperty(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</pre>
<div class="block">PUBLIC:
Returns the property associated with the corresponding key. These properties will be available to
connection events.</div>
</li>
</ul>
<a name="hasLogin--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasLogin</h4>
<pre>public&nbsp;boolean&nbsp;hasLogin()</pre>
<div class="block">PUBLIC:
Return if a login is used, only one of login and pool can be used.</div>
</li>
</ul>
<a name="hasProperties--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasProperties</h4>
<pre>public&nbsp;boolean&nbsp;hasProperties()</pre>
<div class="block">PUBLIC:
Returns true if properties are available on the Connection Policy</div>
</li>
</ul>
<a name="isExclusiveIsolated--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isExclusiveIsolated</h4>
<pre>public&nbsp;boolean&nbsp;isExclusiveIsolated()</pre>
<div class="block">PUBLIC:
Indicates whether exclusiveMode is Isolated.</div>
</li>
</ul>
<a name="isExclusiveAlways--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isExclusiveAlways</h4>
<pre>public&nbsp;boolean&nbsp;isExclusiveAlways()</pre>
<div class="block">PUBLIC:
Indicates whether exclusiveMode is Always.</div>
</li>
</ul>
<a name="isExclusive--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isExclusive</h4>
<pre>public&nbsp;boolean&nbsp;isExclusive()</pre>
<div class="block">PUBLIC:
Indicates whether ExclusiveIsolatedClientSession should be created.</div>
</li>
</ul>
<a name="isLazy--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isLazy</h4>
<pre>public&nbsp;boolean&nbsp;isLazy()</pre>
<div class="block">PUBLIC:
Return if a lazy connection should be used, a lazy connection only acquire a physical connection
when a transaction is started and releases the connection when the transaction completes.</div>
</li>
</ul>
<a name="isPooled--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isPooled</h4>
<pre>public&nbsp;boolean&nbsp;isPooled()</pre>
<div class="block">INTERNAL:
Return if part of a connection pool.</div>
</li>
</ul>
<a name="isUserDefinedConnection--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isUserDefinedConnection</h4>
<pre>public&nbsp;boolean&nbsp;isUserDefinedConnection()</pre>
<div class="block">INTERNAL:
Return if part of a connection pool.</div>
</li>
</ul>
<a name="removeProperty-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeProperty</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;removeProperty(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;key)</pre>
<div class="block">PUBLIC:
This method is used to remove a custom property from the Connection Policy.
This method will return the propery removed. If it was not found then null
will be returned.</div>
</li>
</ul>
<a name="setIsLazy-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIsLazy</h4>
<pre>public&nbsp;void&nbsp;setIsLazy(boolean&nbsp;isLazy)</pre>
<div class="block">PUBLIC:
Set if a lazy connection should be used, a lazy connection only acquire a physical connection
when a transaction is started and releases the connection when the transaction completes.</div>
</li>
</ul>
<a name="setLogin-org.eclipse.persistence.sessions.Login-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLogin</h4>
<pre>public&nbsp;void&nbsp;setLogin(<a href="../../../../../org/eclipse/persistence/sessions/Login.html" title="interface in org.eclipse.persistence.sessions">Login</a>&nbsp;login)</pre>
<div class="block">PUBLIC:
Set the login to use for this connection.
Client sessions support using a separate user login for database modification.
Pooled connections must use the pool's login and cannot define their own.</div>
</li>
</ul>
<a name="setPoolName-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPoolName</h4>
<pre>public&nbsp;void&nbsp;setPoolName(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;poolName)</pre>
<div class="block">PUBLIC:
Set the pool name or null if not part of a pool.</div>
</li>
</ul>
<a name="setProperty-java.lang.Object-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setProperty</h4>
<pre>public&nbsp;void&nbsp;setProperty(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;key,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;property)</pre>
<div class="block">PUBLIC:
Use this method to set custom properties on the Connection Policy. These
properties will be available from within connection events but have no
effect on the connection directly.</div>
</li>
</ul>
<a name="getExclusiveMode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExclusiveMode</h4>
<pre>public&nbsp;<a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.ExclusiveMode.html" title="enum in org.eclipse.persistence.sessions.server">ConnectionPolicy.ExclusiveMode</a>&nbsp;getExclusiveMode()</pre>
<div class="block">PUBLIC:
Returns exclusive mode.</div>
</li>
</ul>
<a name="setExclusiveMode-org.eclipse.persistence.sessions.server.ConnectionPolicy.ExclusiveMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setExclusiveMode</h4>
<pre>public&nbsp;void&nbsp;setExclusiveMode(<a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.ExclusiveMode.html" title="enum in org.eclipse.persistence.sessions.server">ConnectionPolicy.ExclusiveMode</a>&nbsp;exclusiveMode)</pre>
<div class="block">PUBLIC:
Sets exclusive mode, if null is passed sets the default value.</div>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString()</pre>
<div class="block">INTERNAL:
return a string representation of this ConnectionPolicy</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
</dl>
</li>
</ul>
<a name="useLazyConnection--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>useLazyConnection</h4>
<pre>public&nbsp;void&nbsp;useLazyConnection()</pre>
<div class="block">PUBLIC:
A lazy connection only acquires a physical connection
when a transaction is started and releases the connection when the transaction completes.</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">EclipseLink 3.0.0, API Reference</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/eclipse/persistence/sessions/server/ClientSession.html" title="class in org.eclipse.persistence.sessions.server"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/eclipse/persistence/sessions/server/ConnectionPolicy.ExclusiveMode.html" title="enum in org.eclipse.persistence.sessions.server"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/eclipse/persistence/sessions/server/ConnectionPolicy.html" target="_top">Frames</a></li>
<li><a href="ConnectionPolicy.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2007&#x2013;2020 <a href="http://www.eclipse.org/eclipselink">Eclipse.org - EclipseLink Project</a>. All rights reserved.</small></p>
</body>
</html>