uTools-Manuals/docs/java/javax/sql/XADataSource.html

173 lines
7.6 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="header">
<div class="subTitle">
compact2, compact3
</div>
<div class="subTitle">
javax.sql
</div>
<h2 class="title" title="Interface XADataSource">Interface XADataSource</h2>
</div><div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>
All Superinterfaces:
</dt>
<dd>
<span><a href="../../javax/sql/CommonDataSource.html" title="javax.sql中的接口">CommonDataSource</a></span>
</dd>
</dl>
<hr/> <br/> <pre>public interface <span class="typeNameLabel">XADataSource</span>
extends <a href="../../javax/sql/CommonDataSource.html" title="interface in javax.sql">CommonDataSource</a></pre>
<div class="block">
<span>一个用于<code>XAConnection</code>对象的工厂。</span>
<span>实现<code>XADataSource</code>接口的对象通常使用使用Java命名和目录接口JNDI的命名服务注册。</span>
<p> <span>XADataSource的<code>XADataSource</code>必须包括一个public no-arg构造函数。</span> </p>
</div>
<dl>
<dt>
<span class="simpleTagLabel">从以下版本开始:</span>
</dt>
<dd>
1.4
</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>方法摘要</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
<caption>
<span class="activeTableTab" id="t0"><span>所有方法</span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t2"><span><a href="javascript:show(2);">接口方法</a></span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t3"><span><a href="javascript:show(4);">抽象方法</a></span><span class="tabEnd"> </span></span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor" id="i0">
<td class="colFirst"><code><a href="../../javax/sql/XAConnection.html" title="interface in javax.sql">XAConnection</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/sql/XADataSource.html#getXAConnection--">getXAConnection</a></span>()</code>
<div class="block">
尝试建立可在分布式事务中使用的物理数据库连接。
</div> </td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code><a href="../../javax/sql/XAConnection.html" title="interface in javax.sql">XAConnection</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/sql/XADataSource.html#getXAConnection-java.lang.String-java.lang.String-">getXAConnection</a></span>(<a href="../../java/lang/String.html" title="class in java.lang">String</a> user, <a href="../../java/lang/String.html" title="class in java.lang">String</a> password)</code>
<div class="block">
尝试使用给定的用户名和密码建立物理数据库连接。
</div> </td>
</tr>
</tbody>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.javax.sql.CommonDataSource">
<!-- --> </a> <h3>Methods inherited from interface javax.sql.<a href="../../javax/sql/CommonDataSource.html" title="interface in javax.sql">CommonDataSource</a></h3> <code><a href="../../javax/sql/CommonDataSource.html#getLoginTimeout--">getLoginTimeout</a>, <a href="../../javax/sql/CommonDataSource.html#getLogWriter--">getLogWriter</a>, <a href="../../javax/sql/CommonDataSource.html#getParentLogger--">getParentLogger</a>, <a href="../../javax/sql/CommonDataSource.html#setLoginTimeout-int-">setLoginTimeout</a>, <a href="../../javax/sql/CommonDataSource.html#setLogWriter-java.io.PrintWriter-">setLogWriter</a></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>方法详细信息</h3> <a name="getXAConnection--">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>getXAConnection</h4> <pre><a href="../../javax/sql/XAConnection.html" title="interface in javax.sql">XAConnection</a> getXAConnection()
throws <a href="../../java/sql/SQLException.html" title="class in java.sql">SQLException</a></pre>
<div class="block">
尝试建立可在分布式事务中使用的物理数据库连接。
</div>
<dl>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
一个
<code>XAConnection</code>与数据源的物理连接的
<code>XAConnection</code>对象,可以在分布式事务中使用
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../java/sql/SQLException.html" title="class in java.sql">SQLException</a></code> - 如果发生数据库访问错误
</dd>
<dd>
<code><a href="../../java/sql/SQLFeatureNotSupportedException.html" title="class in java.sql">SQLFeatureNotSupportedException</a></code> - 如果JDBC驱动程序不支持此方法
</dd>
<dd>
<code><a href="../../java/sql/SQLTimeoutException.html" title="class in java.sql">SQLTimeoutException</a></code> - 当驱动程序确定已经超过了
<code>setLoginTimeout</code>方法指定的超时值,并且至少尝试取消当前的数据库连接尝试
</dd>
<dt>
<span class="simpleTagLabel">从以下版本开始:</span>
</dt>
<dd>
1.4
</dd>
</dl> </li>
</ul> <a name="getXAConnection-java.lang.String-java.lang.String-">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>getXAConnection</h4> <pre><a href="../../javax/sql/XAConnection.html" title="interface in javax.sql">XAConnection</a> getXAConnection(<a href="../../java/lang/String.html" title="class in java.lang">String</a> user,
<a href="../../java/lang/String.html" title="class in java.lang">String</a> password)
throws <a href="../../java/sql/SQLException.html" title="class in java.sql">SQLException</a></pre>
<div class="block">
<span>尝试使用给定的用户名和密码建立物理数据库连接。</span>
<span>返回的连接是可以在分布式事务中使用的连接。</span>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>user</code> - 正在连接的数据库用户
</dd>
<dd>
<code>password</code> - 用户密码
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
一个
<code>XAConnection</code>对象,表示与数据源的物理连接,可以在分布式事务中使用
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../java/sql/SQLException.html" title="class in java.sql">SQLException</a></code> - 如果发生数据库访问错误
</dd>
<dd>
<code><a href="../../java/sql/SQLFeatureNotSupportedException.html" title="class in java.sql">SQLFeatureNotSupportedException</a></code> - 如果JDBC驱动程序不支持此方法
</dd>
<dd>
<code><a href="../../java/sql/SQLTimeoutException.html" title="class in java.sql">SQLTimeoutException</a></code> - 当驱动程序确定已经超过
<code>setLoginTimeout</code>方法指定的超时值,并且至少尝试取消当前数据库连接尝试
</dd>
<dt>
<span class="simpleTagLabel">从以下版本开始:</span>
</dt>
<dd>
1.4
</dd>
</dl> </li>
</ul> </li>
</ul> </li>
</ul>
</div>
</div>