📄 connector3.html
字号:
<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <title>Common Client Interface</title> <link rel="StyleSheet" href="document.css" type="text/css" media="all" /> <link rel="StyleSheet" href="catalog.css" type="text/css" media="all" /> <link rel="Table of Contents" href="J2EETutorialTOC.html" /> <link rel="Previous" href="Connector2.html" /> <link rel="Next" href="JMS.html" /> <link rel="Index" href="J2EETutorialIX.html" /> </head> <body> <table width="550" summary="layout" id="SummaryNotReq1"> <tr> <td align="left" valign="center"> <font size="-1"> <a href="http://java.sun.com/j2ee/1.4/download.html#tutorial" target="_blank">Download</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/faq.html" target="_blank">FAQ</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/history.html" target="_blank">History</a> </td> <td align="center" valign="center"><a accesskey="p" href="Connector2.html"><img id="LongDescNotReq1" src="images/PrevArrow.gif" width="26" height="26" border="0" alt="Prev" /></a><a accesskey="c" href="J2EETutorialFront.html"><img id="LongDescNotReq1" src="images/UpArrow.gif" width="26" height="26" border="0" alt="Home" /></a><a accesskey="n" href="JMS.html"><img id="LongDescNotReq3" src="images/NextArrow.gif" width="26" height="26" border="0" alt="Next" /></a><a accesskey="i" href="J2EETutorialIX.html"></a> </td> <td align="right" valign="center"> <font size="-1"> <a href="http://java.sun.com/j2ee/1.4/docs/api/index.html" target="_blank">API</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/search.html" target="_blank">Search</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/sendusmail.html" target="_blank">Feedback</a></font> </font> </td> </tr> </table> <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider"> <blockquote><a name="wp80040"> </a><h2 class="pHeading1">Common Client Interface</h2><a name="wp80042"> </a><p class="pBody">This section describes how components use the Connector architecture Common Client Interface (CCI) API and a resource adapter to access data from an EIS.</p><a name="wp80046"> </a><p class="pBody">Defined by the J2EE Connector architecture specification, the CCI defines a set of interfaces and classes whose methods allow a client to perform typical data access operations. The CCI interfaces and classes are as follows:</p><div class="pSmartList1"><ul class="pSmartList1"><a name="wp80048"> </a><div class="pSmartList1"><li><code class="cCode">ConnectionFactory</code>: Provides an application component with a <code class="cCode">Connection</code> instance to an EIS.</li></div><a name="wp80049"> </a><div class="pSmartList1"><li><code class="cCode">Connection</code>: Represents the connection to the underlying EIS.</li></div><a name="wp80050"> </a><div class="pSmartList1"><li><code class="cCode">ConnectionSpec</code>: Provides a means for an application component to pass connection-request-specific properties to the <code class="cCode">ConnectionFactory</code> when making a connection request.</li></div><a name="wp80051"> </a><div class="pSmartList1"><li><code class="cCode">Interaction</code>: Provides a means for an application component to execute EIS functions, such as database stored procedures.</li></div><a name="wp80052"> </a><div class="pSmartList1"><li><code class="cCode">InteractionSpec</code>: Holds properties pertaining to an application component's interaction with an EIS.</li></div><a name="wp80053"> </a><div class="pSmartList1"><li><code class="cCode">Record</code>: The superclass for the different kinds of record instances. Record instances may be <code class="cCode">MappedRecord</code>, <code class="cCode">IndexedRecord</code>, or <code class="cCode">ResultSet</code> instances, which all inherit from the <code class="cCode">Record</code> interface.</li></div><a name="wp80054"> </a><div class="pSmartList1"><li><code class="cCode">RecordFactory</code>: Provides an application component with a <code class="cCode">Record</code> instance. </li></div><a name="wp80055"> </a><div class="pSmartList1"><li><code class="cCode">IndexedRecord</code>: Represents an ordered collection of <code class="cCode">Record</code> instances based on the <code class="cCode">java.util.List</code> interface.</li></div></ul></div><a name="wp80056"> </a><p class="pBody">A client or application component that uses the CCI to interact with an underlying EIS does so in a prescribed manner. The component must establish a connection to the EIS's resource manager, and it does so using the <code class="cCode">ConnectionFactory</code>. The <code class="cCode">Connection</code> object represents the actual connection to the EIS and is used for subsequent interactions with the EIS.</p><a name="wp80059"> </a><p class="pBody">The component performs its interactions with the EIS, such as accessing data from a specific table, using an <code class="cCode">Interaction</code> object. The application component defines the <code class="cCode">Interaction</code> object using an <code class="cCode">InteractionSpec</code> object. When the application component reads data from the EIS (such as from database tables) or writes to those tables, it does so using a particular type of <code class="cCode">Record</code> instance, either a <code class="cCode">MappedRecord</code>, <code class="cCode">IndexedRecord</code>, or <code class="cCode">ResultSet</code> instance. Just as the <code class="cCode">ConnectionFactory</code> creates <code class="cCode">Connection</code> instances, a <code class="cCode">RecordFactory</code> creates <code class="cCode">Record</code> instances.</p><a name="wp80153"> </a><p class="pBody">Note, too, that a client application that relies on a CCI resource adapter is very much like any other J2EE client that uses enterprise bean methods. </p> </blockquote> <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider"> <table width="550" summary="layout" id="SummaryNotReq1"> <tr> <td align="left" valign="center"> <font size="-1"> <a href="http://java.sun.com/j2ee/1.4/download.html#tutorial" target="_blank">Download</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/faq.html" target="_blank">FAQ</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/history.html" target="_blank">History</a> </td> <td align="center" valign="center"><a accesskey="p" href="Connector2.html"><img id="LongDescNotReq1" src="images/PrevArrow.gif" width="26" height="26" border="0" alt="Prev" /></a><a accesskey="c" href="J2EETutorialFront.html"><img id="LongDescNotReq1" src="images/UpArrow.gif" width="26" height="26" border="0" alt="Home" /></a><a accesskey="n" href="JMS.html"><img id="LongDescNotReq3" src="images/NextArrow.gif" width="26" height="26" border="0" alt="Next" /></a><a accesskey="i" href="J2EETutorialIX.html"></a> </td> <td align="right" valign="center"> <font size="-1"> <a href="http://java.sun.com/j2ee/1.4/docs/api/index.html" target="_blank">API</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/search.html" target="_blank">Search</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/sendusmail.html" target="_blank">Feedback</a></font> </font> </td> </tr> </table> <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider"><p><font size="-1">All of the material in <em>The J2EE(TM) 1.4 Tutorial</em> is <a href="J2EETutorialFront2.html">copyright</a>-protected and may not be published in other workswithout express written permission from Sun Microsystems.</font> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -