blob: 8d1b8c8c829ba8fd1713397b92707beb333c4c4a [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>ResourceAdapter</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="ResourceAdapter";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":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/spi/ManagedConnectionMetaData.html" title="interface in jakarta.resource.spi"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../jakarta/resource/spi/ResourceAdapterAssociation.html" title="interface in jakarta.resource.spi"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?jakarta/resource/spi/ResourceAdapter.html" target="_top">Frames</a></li>
<li><a href="ResourceAdapter.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.spi</div>
<h2 title="Interface ResourceAdapter" class="title">Interface ResourceAdapter</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="typeNameLabel">ResourceAdapter</span></pre>
<div class="block">This represents a resource adapter instance and contains operations for
lifecycle management and message endpoint setup. A concrete implementation
of this interface is required to be a JavaBean.</div>
</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>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/resource/spi/ResourceAdapter.html#endpointActivation-jakarta.resource.spi.endpoint.MessageEndpointFactory-jakarta.resource.spi.ActivationSpec-">endpointActivation</a></span>(<a href="../../../jakarta/resource/spi/endpoint/MessageEndpointFactory.html" title="interface in jakarta.resource.spi.endpoint">MessageEndpointFactory</a>&nbsp;endpointFactory,
<a href="../../../jakarta/resource/spi/ActivationSpec.html" title="interface in jakarta.resource.spi">ActivationSpec</a>&nbsp;spec)</code>
<div class="block">This is called during the activation of a message endpoint.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/resource/spi/ResourceAdapter.html#endpointDeactivation-jakarta.resource.spi.endpoint.MessageEndpointFactory-jakarta.resource.spi.ActivationSpec-">endpointDeactivation</a></span>(<a href="../../../jakarta/resource/spi/endpoint/MessageEndpointFactory.html" title="interface in jakarta.resource.spi.endpoint">MessageEndpointFactory</a>&nbsp;endpointFactory,
<a href="../../../jakarta/resource/spi/ActivationSpec.html" title="interface in jakarta.resource.spi">ActivationSpec</a>&nbsp;spec)</code>
<div class="block">This is called when a message endpoint is deactivated.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>javax.transaction.xa.XAResource[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/resource/spi/ResourceAdapter.html#getXAResources-jakarta.resource.spi.ActivationSpec:A-">getXAResources</a></span>(<a href="../../../jakarta/resource/spi/ActivationSpec.html" title="interface in jakarta.resource.spi">ActivationSpec</a>[]&nbsp;specs)</code>
<div class="block">This method is called by the application server during crash recovery.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/resource/spi/ResourceAdapter.html#start-jakarta.resource.spi.BootstrapContext-">start</a></span>(<a href="../../../jakarta/resource/spi/BootstrapContext.html" title="interface in jakarta.resource.spi">BootstrapContext</a>&nbsp;ctx)</code>
<div class="block">This is called when a resource adapter instance is bootstrapped.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/resource/spi/ResourceAdapter.html#stop--">stop</a></span>()</code>
<div class="block">This is called when a resource adapter instance is undeployed or
during application server shutdown.</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="start-jakarta.resource.spi.BootstrapContext-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>void&nbsp;start(<a href="../../../jakarta/resource/spi/BootstrapContext.html" title="interface in jakarta.resource.spi">BootstrapContext</a>&nbsp;ctx)
throws <a href="../../../jakarta/resource/spi/ResourceAdapterInternalException.html" title="class in jakarta.resource.spi">ResourceAdapterInternalException</a></pre>
<div class="block">This is called when a resource adapter instance is bootstrapped. This
may be during resource adapter deployment or application server startup.
This is a startup notification from the application server, and this
method is called by an application server thread. The application server
thread executes in an unspecified context.
<p>During this method call a ResourceAdapter JavaBean is
responsible for initializing the resource adapter
instance. Any exception thrown during this method
call causes the application server to abort the bootstrap procedure
for this specific resource adapter instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ctx</code> - a bootstrap context containing references to
useful facilities that could be used by a resource adapter instance.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../jakarta/resource/spi/ResourceAdapterInternalException.html" title="class in jakarta.resource.spi">ResourceAdapterInternalException</a></code> - indicates bootstrap failure.
The resource adapter instance is unusable and must be discarded.</dd>
</dl>
</li>
</ul>
<a name="stop--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stop</h4>
<pre>void&nbsp;stop()</pre>
<div class="block">This is called when a resource adapter instance is undeployed or
during application server shutdown. This is a shutdown notification
from the application server, and this method is called by an
application server thread. The application server
thread executes in an unspecified context.
<p>During this method call, a ResourceAdapter
JavaBean is responsible for performing an orderly shutdown of the
resource adapter instance. Any exception thrown by this
method call does not alter the
processing of the application server shutdown or resource
adapter undeployment that caused this method call. The application
server may log the exception information for error reporting purposes.</div>
</li>
</ul>
<a name="endpointActivation-jakarta.resource.spi.endpoint.MessageEndpointFactory-jakarta.resource.spi.ActivationSpec-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>endpointActivation</h4>
<pre>void&nbsp;endpointActivation(<a href="../../../jakarta/resource/spi/endpoint/MessageEndpointFactory.html" title="interface in jakarta.resource.spi.endpoint">MessageEndpointFactory</a>&nbsp;endpointFactory,
<a href="../../../jakarta/resource/spi/ActivationSpec.html" title="interface in jakarta.resource.spi">ActivationSpec</a>&nbsp;spec)
throws <a href="../../../jakarta/resource/ResourceException.html" title="class in jakarta.resource">ResourceException</a></pre>
<div class="block">This is called during the activation of a message endpoint. This causes
the resource adapter instance to do the necessary setup (ie., setup
message delivery for the message endpoint with a message provider).
Note that message delivery to the message endpoint might start even
before this method returns.
<p>Endpoint activation is deemed successful only when this method
completes successfully without throwing any exceptions.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>endpointFactory</code> - a message endpoint factory instance.</dd>
<dd><code>spec</code> - an activation spec JavaBean instance.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../jakarta/resource/NotSupportedException.html" title="class in jakarta.resource">NotSupportedException</a></code> - indicates message endpoint
activation rejection due to incorrect activation
setup information.</dd>
<dd><code><a href="../../../jakarta/resource/ResourceException.html" title="class in jakarta.resource">ResourceException</a></code></dd>
</dl>
</li>
</ul>
<a name="endpointDeactivation-jakarta.resource.spi.endpoint.MessageEndpointFactory-jakarta.resource.spi.ActivationSpec-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>endpointDeactivation</h4>
<pre>void&nbsp;endpointDeactivation(<a href="../../../jakarta/resource/spi/endpoint/MessageEndpointFactory.html" title="interface in jakarta.resource.spi.endpoint">MessageEndpointFactory</a>&nbsp;endpointFactory,
<a href="../../../jakarta/resource/spi/ActivationSpec.html" title="interface in jakarta.resource.spi">ActivationSpec</a>&nbsp;spec)</pre>
<div class="block">This is called when a message endpoint is deactivated. The instances
passed as arguments to this method call should be identical to those
passed in for the corresponding </code>endpointActivation</code> call.
This causes the resource adapter to stop delivering messages to the
message endpoint.
<p>Any exception thrown by this method is ignored. After
this method call, the endpoint is deemed inactive.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>endpointFactory</code> - a message endpoint factory instance.</dd>
<dd><code>spec</code> - an activation spec JavaBean instance.</dd>
</dl>
</li>
</ul>
<a name="getXAResources-jakarta.resource.spi.ActivationSpec:A-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getXAResources</h4>
<pre>javax.transaction.xa.XAResource[]&nbsp;getXAResources(<a href="../../../jakarta/resource/spi/ActivationSpec.html" title="interface in jakarta.resource.spi">ActivationSpec</a>[]&nbsp;specs)
throws <a href="../../../jakarta/resource/ResourceException.html" title="class in jakarta.resource">ResourceException</a></pre>
<div class="block">This method is called by the application server during crash recovery.
This method takes in an array of <code>ActivationSpec</code> JavaBeans
and returns an array of <code>XAResource</code> objects each of which
represents a unique resource manager.
The resource adapter may return null if it does not implement the
<code>XAResource</code> interface. Otherwise, it must return an array
of <code>XAResource</code> objects, each of which represents a unique
resource manager that was used by the endpoint applications.
The application server uses the <code>XAResource</code> objects to
query each resource manager for a list of in-doubt transactions.
It then completes each pending transaction by sending the commit
decision to the participating resource managers.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>specs</code> - an array of <code>ActivationSpec</code> JavaBeans each of
which corresponds to an deployed endpoint application that was
active prior to the system crash.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an array of <code>XAResource</code> objects each of which
represents a unique resource manager.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../jakarta/resource/ResourceException.html" title="class in jakarta.resource">ResourceException</a></code> - generic exception if operation fails due to an
error condition.</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/spi/ManagedConnectionMetaData.html" title="interface in jakarta.resource.spi"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../jakarta/resource/spi/ResourceAdapterAssociation.html" title="interface in jakarta.resource.spi"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?jakarta/resource/spi/ResourceAdapter.html" target="_top">Frames</a></li>
<li><a href="ResourceAdapter.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>