blob: 8da5bcea936f788b93910548a5913e4b98929d48 [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>
<title>ManagedConnectionFactory</title>
<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="ManagedConnectionFactory";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../javax/resource/spi/ManagedConnection.html" title="interface in javax.resource.spi"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../javax/resource/spi/ManagedConnectionMetaData.html" title="interface in javax.resource.spi"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?javax/resource/spi/ManagedConnectionFactory.html" target="_top">Frames</a></li>
<li><a href="ManagedConnectionFactory.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>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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">javax.resource.spi</div>
<h2 title="Interface ManagedConnectionFactory" class="title">Interface ManagedConnectionFactory</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd>java.io.Serializable</dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">ManagedConnectionFactory</span>
extends java.io.Serializable</pre>
<div class="block">ManagedConnectionFactory instance is a factory of both ManagedConnection
and EIS-specific connection factory instances. This interface supports
connection pooling by providing methods for matching and creation of
ManagedConnection instance. A ManagedConnectionFactory
instance is required to be a JavaBean.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../javax/resource/spi/ManagedConnection.html" title="interface in javax.resource.spi"><code>ManagedConnection</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== 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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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>java.lang.Object</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/resource/spi/ManagedConnectionFactory.html#createConnectionFactory--">createConnectionFactory</a></span>()</code>
<div class="block">Creates a Connection Factory instance.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/resource/spi/ManagedConnectionFactory.html#createConnectionFactory-javax.resource.spi.ConnectionManager-">createConnectionFactory</a></span>(<a href="../../../javax/resource/spi/ConnectionManager.html" title="interface in javax.resource.spi">ConnectionManager</a>&nbsp;cxManager)</code>
<div class="block">Creates a Connection Factory instance.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../javax/resource/spi/ManagedConnection.html" title="interface in javax.resource.spi">ManagedConnection</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/resource/spi/ManagedConnectionFactory.html#createManagedConnection-javax.security.auth.Subject-javax.resource.spi.ConnectionRequestInfo-">createManagedConnection</a></span>(javax.security.auth.Subject&nbsp;subject,
<a href="../../../javax/resource/spi/ConnectionRequestInfo.html" title="interface in javax.resource.spi">ConnectionRequestInfo</a>&nbsp;cxRequestInfo)</code>
<div class="block">Creates a new physical connection to the underlying EIS
resource manager.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/resource/spi/ManagedConnectionFactory.html#equals-java.lang.Object-">equals</a></span>(java.lang.Object&nbsp;other)</code>
<div class="block">Check if this ManagedConnectionFactory is equal to another
ManagedConnectionFactory.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.io.PrintWriter</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/resource/spi/ManagedConnectionFactory.html#getLogWriter--">getLogWriter</a></span>()</code>
<div class="block">Get the log writer for this ManagedConnectionFactory instance.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/resource/spi/ManagedConnectionFactory.html#hashCode--">hashCode</a></span>()</code>
<div class="block">Returns the hash code for the ManagedConnectionFactory</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../javax/resource/spi/ManagedConnection.html" title="interface in javax.resource.spi">ManagedConnection</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/resource/spi/ManagedConnectionFactory.html#matchManagedConnections-java.util.Set-javax.security.auth.Subject-javax.resource.spi.ConnectionRequestInfo-">matchManagedConnections</a></span>(java.util.Set&nbsp;connectionSet,
javax.security.auth.Subject&nbsp;subject,
<a href="../../../javax/resource/spi/ConnectionRequestInfo.html" title="interface in javax.resource.spi">ConnectionRequestInfo</a>&nbsp;cxRequestInfo)</code>
<div class="block">Returns a matched connection from the candidate set of connections.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/resource/spi/ManagedConnectionFactory.html#setLogWriter-java.io.PrintWriter-">setLogWriter</a></span>(java.io.PrintWriter&nbsp;out)</code>
<div class="block">Set the log writer for this ManagedConnectionFactory instance.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="createConnectionFactory-javax.resource.spi.ConnectionManager-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createConnectionFactory</h4>
<pre>java.lang.Object&nbsp;createConnectionFactory(<a href="../../../javax/resource/spi/ConnectionManager.html" title="interface in javax.resource.spi">ConnectionManager</a>&nbsp;cxManager)
throws <a href="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</a></pre>
<div class="block">Creates a Connection Factory instance. The Connection Factory
instance gets initialized with the passed ConnectionManager. In
the managed scenario, ConnectionManager is provided by the
application server.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cxManager</code> - ConnectionManager to be associated with
created EIS connection factory instance</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>EIS-specific Connection Factory instance or
javax.resource.cci.ConnectionFactory instance</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</a></code> - Generic exception</dd>
<dd><code><a href="../../../javax/resource/spi/ResourceAdapterInternalException.html" title="class in javax.resource.spi">ResourceAdapterInternalException</a></code> - Resource adapter related error condition</dd>
</dl>
</li>
</ul>
<a name="createConnectionFactory--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createConnectionFactory</h4>
<pre>java.lang.Object&nbsp;createConnectionFactory()
throws <a href="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</a></pre>
<div class="block">Creates a Connection Factory instance. The Connection Factory
instance gets initialized with a default ConnectionManager provided
by the resource adapter.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>EIS-specific Connection Factory instance or
javax.resource.cci.ConnectionFactory instance</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</a></code> - Generic exception</dd>
<dd><code><a href="../../../javax/resource/spi/ResourceAdapterInternalException.html" title="class in javax.resource.spi">ResourceAdapterInternalException</a></code> - Resource adapter related error condition</dd>
</dl>
</li>
</ul>
<a name="createManagedConnection-javax.security.auth.Subject-javax.resource.spi.ConnectionRequestInfo-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createManagedConnection</h4>
<pre><a href="../../../javax/resource/spi/ManagedConnection.html" title="interface in javax.resource.spi">ManagedConnection</a>&nbsp;createManagedConnection(javax.security.auth.Subject&nbsp;subject,
<a href="../../../javax/resource/spi/ConnectionRequestInfo.html" title="interface in javax.resource.spi">ConnectionRequestInfo</a>&nbsp;cxRequestInfo)
throws <a href="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</a></pre>
<div class="block">Creates a new physical connection to the underlying EIS
resource manager.
<p>ManagedConnectionFactory uses the security information (passed as
Subject) and additional ConnectionRequestInfo (which is specific to
ResourceAdapter and opaque to application server) to create this new
connection.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>subject</code> - Caller's security information</dd>
<dd><code>cxRequestInfo</code> - Additional resource adapter specific connection
request information</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>ManagedConnection instance</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</a></code> - generic exception</dd>
<dd><code><a href="../../../javax/resource/spi/SecurityException.html" title="class in javax.resource.spi">SecurityException</a></code> - security related error</dd>
<dd><code><a href="../../../javax/resource/spi/ResourceAllocationException.html" title="class in javax.resource.spi">ResourceAllocationException</a></code> - failed to allocate system resources for
connection request</dd>
<dd><code><a href="../../../javax/resource/spi/ResourceAdapterInternalException.html" title="class in javax.resource.spi">ResourceAdapterInternalException</a></code> - resource adapter related error condition</dd>
<dd><code><a href="../../../javax/resource/spi/EISSystemException.html" title="class in javax.resource.spi">EISSystemException</a></code> - internal error condition in EIS instance</dd>
</dl>
</li>
</ul>
<a name="matchManagedConnections-java.util.Set-javax.security.auth.Subject-javax.resource.spi.ConnectionRequestInfo-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>matchManagedConnections</h4>
<pre><a href="../../../javax/resource/spi/ManagedConnection.html" title="interface in javax.resource.spi">ManagedConnection</a>&nbsp;matchManagedConnections(java.util.Set&nbsp;connectionSet,
javax.security.auth.Subject&nbsp;subject,
<a href="../../../javax/resource/spi/ConnectionRequestInfo.html" title="interface in javax.resource.spi">ConnectionRequestInfo</a>&nbsp;cxRequestInfo)
throws <a href="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</a></pre>
<div class="block">Returns a matched connection from the candidate set of connections.
<p>ManagedConnectionFactory uses the security info (as in Subject)
and information provided through ConnectionRequestInfo and additional
Resource Adapter specific criteria to do matching. Note that criteria
used for matching is specific to a resource adapter and is not
prescribed by the Connector specification.</p>
<p>This method returns a ManagedConnection instance that is the best
match for handling the connection allocation request.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>connectionSet</code> - candidate connection set</dd>
<dd><code>subject</code> - caller's security information</dd>
<dd><code>cxRequestInfo</code> - additional resource adapter specific
connection request information</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>ManagedConnection if resource adapter finds an
acceptable match otherwise null</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</a></code> - generic exception</dd>
<dd><code><a href="../../../javax/resource/spi/SecurityException.html" title="class in javax.resource.spi">SecurityException</a></code> - security related error</dd>
<dd><code><a href="../../../javax/resource/spi/ResourceAdapterInternalException.html" title="class in javax.resource.spi">ResourceAdapterInternalException</a></code> - resource adapter related error condition</dd>
<dd><code><a href="../../../javax/resource/NotSupportedException.html" title="class in javax.resource">NotSupportedException</a></code> - if operation is not supported</dd>
</dl>
</li>
</ul>
<a name="setLogWriter-java.io.PrintWriter-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLogWriter</h4>
<pre>void&nbsp;setLogWriter(java.io.PrintWriter&nbsp;out)
throws <a href="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</a></pre>
<div class="block">Set the log writer for this ManagedConnectionFactory instance.</p>
<p>The log writer is a character output stream to which all logging and
tracing messages for this ManagedConnectionfactory instance will be
printed.</p>
<p>ApplicationServer manages the association of output stream with the
ManagedConnectionFactory. When a ManagedConnectionFactory object is
created the log writer is initially null, in other words, logging is
disabled. Once a log writer is associated with a
ManagedConnectionFactory, logging and tracing for
ManagedConnectionFactory instance is enabled.
<p>The ManagedConnection instances created by ManagedConnectionFactory
"inherits" the log writer, which can be overridden by ApplicationServer
using ManagedConnection.setLogWriter to set ManagedConnection specific
logging and tracing.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>out</code> - PrintWriter - an out stream for
error logging and tracing</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</a></code> - generic exception</dd>
<dd><code><a href="../../../javax/resource/spi/ResourceAdapterInternalException.html" title="class in javax.resource.spi">ResourceAdapterInternalException</a></code> - resource adapter related error condition</dd>
</dl>
</li>
</ul>
<a name="getLogWriter--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLogWriter</h4>
<pre>java.io.PrintWriter&nbsp;getLogWriter()
throws <a href="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</a></pre>
<div class="block">Get the log writer for this ManagedConnectionFactory instance.
<p>The log writer is a character output stream to which all logging and
tracing messages for this ManagedConnectionFactory instance will be
printed
<p>ApplicationServer manages the association of output stream with the
ManagedConnectionFactory. When a ManagedConnectionFactory object is
created the log writer is initially null, in other words, logging is
disabled.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>PrintWriter</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../javax/resource/ResourceException.html" title="class in javax.resource">ResourceException</a></code> - generic exception</dd>
</dl>
</li>
</ul>
<a name="hashCode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>int&nbsp;hashCode()</pre>
<div class="block">Returns the hash code for the ManagedConnectionFactory</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>hashCode</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>hash code for the ManagedConnectionFactory</dd>
</dl>
</li>
</ul>
<a name="equals-java.lang.Object-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>equals</h4>
<pre>boolean&nbsp;equals(java.lang.Object&nbsp;other)</pre>
<div class="block">Check if this ManagedConnectionFactory is equal to another
ManagedConnectionFactory.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>equals</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if two instances are equal</dd>
</dl>
</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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../javax/resource/spi/ManagedConnection.html" title="interface in javax.resource.spi"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../javax/resource/spi/ManagedConnectionMetaData.html" title="interface in javax.resource.spi"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?javax/resource/spi/ManagedConnectionFactory.html" target="_top">Frames</a></li>
<li><a href="ManagedConnectionFactory.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>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>