blob: ba16f8ba955755626088526a2aa9c638c984d9e7 [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>ConnectionFactory</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="ConnectionFactory";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":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="../../../jakarta/resource/cci/Connection.html" title="interface in jakarta.resource.cci"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../jakarta/resource/cci/ConnectionMetaData.html" title="interface in jakarta.resource.cci"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?jakarta/resource/cci/ConnectionFactory.html" target="_top">Frames</a></li>
<li><a href="ConnectionFactory.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">jakarta.resource.cci</div>
<h2 title="Interface ConnectionFactory" class="title">Interface ConnectionFactory</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd>javax.naming.Referenceable, java.io.Serializable</dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">ConnectionFactory</span>
extends java.io.Serializable, <a href="../../../jakarta/resource/Referenceable.html" title="interface in jakarta.resource">Referenceable</a></pre>
<div class="block"><code>ConnectionFactory</code> provides an interface for getting
connection to an EIS instance. An implementation of ConnectionFactory
interface is provided by a resource adapter.
<p>Application code looks up a ConnectionFactory instance from JNDI
namespace and uses it to get EIS connections.
<p>An implementation class for ConnectionFactory is required to
implement <code>java.io.Serializable</code> and
<code>jakarta.resource.Referenceable</code>interfaces to support
JNDI registration.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../jakarta/resource/cci/Connection.html" title="interface in jakarta.resource.cci"><code>Connection</code></a>,
<a href="../../../jakarta/resource/Referenceable.html" title="interface in jakarta.resource"><code>Referenceable</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><a href="../../../jakarta/resource/cci/Connection.html" title="interface in jakarta.resource.cci">Connection</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/resource/cci/ConnectionFactory.html#getConnection--">getConnection</a></span>()</code>
<div class="block">Gets a connection to an EIS instance.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../jakarta/resource/cci/Connection.html" title="interface in jakarta.resource.cci">Connection</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/resource/cci/ConnectionFactory.html#getConnection-jakarta.resource.cci.ConnectionSpec-">getConnection</a></span>(<a href="../../../jakarta/resource/cci/ConnectionSpec.html" title="interface in jakarta.resource.cci">ConnectionSpec</a>&nbsp;properties)</code>
<div class="block">Gets a connection to an EIS instance.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../jakarta/resource/cci/ResourceAdapterMetaData.html" title="interface in jakarta.resource.cci">ResourceAdapterMetaData</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/resource/cci/ConnectionFactory.html#getMetaData--">getMetaData</a></span>()</code>
<div class="block">Gets metadata for the Resource Adapter.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../jakarta/resource/cci/RecordFactory.html" title="interface in jakarta.resource.cci">RecordFactory</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/resource/cci/ConnectionFactory.html#getRecordFactory--">getRecordFactory</a></span>()</code>
<div class="block">Gets a RecordFactory instance.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.jakarta.resource.Referenceable">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;jakarta.resource.<a href="../../../jakarta/resource/Referenceable.html" title="interface in jakarta.resource">Referenceable</a></h3>
<code><a href="../../../jakarta/resource/Referenceable.html#setReference-javax.naming.Reference-">setReference</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.javax.naming.Referenceable">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;javax.naming.Referenceable</h3>
<code>getReference</code></li>
</ul>
</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="getConnection--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConnection</h4>
<pre><a href="../../../jakarta/resource/cci/Connection.html" title="interface in jakarta.resource.cci">Connection</a>&nbsp;getConnection()
throws <a href="../../../jakarta/resource/ResourceException.html" title="class in jakarta.resource">ResourceException</a></pre>
<div class="block">Gets a connection to an EIS instance. This getConnection variant
should be used when a component wants the container to manage EIS
sign-on. This case is termed container-managed sign-on. The
component does not pass any security information.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Connection instance</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../jakarta/resource/ResourceException.html" title="class in jakarta.resource">ResourceException</a></code> - Failed to get a connection to
the EIS instance. Examples of
error cases are:
<UL>
<LI> Invalid configuration of ManagedConnectionFactory--
example: invalid server name
<LI> Application server-internal error--example:
connection pool related error
<LI> Communication error
<LI> EIS-specific error--example: EIS not active
<LI> Resource adapter-internal error
<LI> Security related error; example: invalid user
<LI> Failure to allocate system resources
</UL></dd>
</dl>
</li>
</ul>
<a name="getConnection-jakarta.resource.cci.ConnectionSpec-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConnection</h4>
<pre><a href="../../../jakarta/resource/cci/Connection.html" title="interface in jakarta.resource.cci">Connection</a>&nbsp;getConnection(<a href="../../../jakarta/resource/cci/ConnectionSpec.html" title="interface in jakarta.resource.cci">ConnectionSpec</a>&nbsp;properties)
throws <a href="../../../jakarta/resource/ResourceException.html" title="class in jakarta.resource">ResourceException</a></pre>
<div class="block">Gets a connection to an EIS instance. A component should use
the getConnection variant with javax.resource.cci.ConnectionSpec
parameter, if it needs to pass any resource adapter specific
security information and connection parameters. In the component-
managed sign-on case, an application component passes security
information (example: username, password) through the
ConnectionSpec instance.
<p>It is important to note that the properties passed through
the getConnection method should be client-specific (example:
username, password, language) and not related to the
configuration of a target EIS instance (example: port number,
server name). The ManagedConnectionFactory instance is configured
with complete set of properties required for the creation of a
connection to an EIS instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>properties</code> - Connection parameters and security
information specified as
ConnectionSpec instance</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Connection instance</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../jakarta/resource/ResourceException.html" title="class in jakarta.resource">ResourceException</a></code> - Failed to get a connection to
the EIS instance. Examples of
error cases are:
<UL>
<LI> Invalid specification of input parameters
<LI> Invalid configuration of ManagedConnectionFactory--
example: invalid server name
<LI> Application server-internal error--example:
connection pool related error
<LI> Communication error
<LI> EIS-specific error--example: EIS not active
<LI> Resource adapter-internal error
<LI> Security related error; example: invalid user
<LI> Failure to allocate system resources
</UL></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../jakarta/resource/cci/ConnectionSpec.html" title="interface in jakarta.resource.cci"><code>ConnectionSpec</code></a></dd>
</dl>
</li>
</ul>
<a name="getRecordFactory--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRecordFactory</h4>
<pre><a href="../../../jakarta/resource/cci/RecordFactory.html" title="interface in jakarta.resource.cci">RecordFactory</a>&nbsp;getRecordFactory()
throws <a href="../../../jakarta/resource/ResourceException.html" title="class in jakarta.resource">ResourceException</a></pre>
<div class="block">Gets a RecordFactory instance. The RecordFactory is used for
the creation of generic Record instances.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>RecordFactory RecordFactory instance</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../jakarta/resource/ResourceException.html" title="class in jakarta.resource">ResourceException</a></code> - Failed to create a RecordFactory</dd>
<dd><code><a href="../../../jakarta/resource/NotSupportedException.html" title="class in jakarta.resource">NotSupportedException</a></code> - Operation not supported</dd>
</dl>
</li>
</ul>
<a name="getMetaData--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getMetaData</h4>
<pre><a href="../../../jakarta/resource/cci/ResourceAdapterMetaData.html" title="interface in jakarta.resource.cci">ResourceAdapterMetaData</a>&nbsp;getMetaData()
throws <a href="../../../jakarta/resource/ResourceException.html" title="class in jakarta.resource">ResourceException</a></pre>
<div class="block">Gets metadata for the Resource Adapter. Note that the metadata
information is about the ResourceAdapter and not the EIS instance.
An invocation of this method does not require that an active
connection to an EIS instance should have been established.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>ResourceAdapterMetaData instance</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../jakarta/resource/ResourceException.html" title="class in jakarta.resource">ResourceException</a></code> - Failed to get metadata information
about the resource adapter</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="../../../jakarta/resource/cci/Connection.html" title="interface in jakarta.resource.cci"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../jakarta/resource/cci/ConnectionMetaData.html" title="interface in jakarta.resource.cci"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?jakarta/resource/cci/ConnectionFactory.html" target="_top">Frames</a></li>
<li><a href="ConnectionFactory.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>