xaresource.html

来自「j2ee帮助文档软件设计/软件工程 文件格式」· HTML 代码 · 共 808 行 · 第 1/3 页

HTML
808
字号
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtains the current transaction timeout value set for this XAResource instance.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/transaction/xa/XAResource.html#isSameRM(javax.transaction.xa.XAResource)">isSameRM</A></B>(<A HREF="../../../javax/transaction/xa/XAResource.html" title="interface in javax.transaction.xa">XAResource</A>&nbsp;xares)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is called to determine if the resource manager instance represented by the target object is the same as the resouce manager instance represented by the parameter <i>xares</i>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/transaction/xa/XAResource.html#prepare(javax.transaction.xa.Xid)">prepare</A></B>(<A HREF="../../../javax/transaction/xa/Xid.html" title="interface in javax.transaction.xa">Xid</A>&nbsp;xid)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/transaction/xa/Xid.html" title="interface in javax.transaction.xa">Xid</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/transaction/xa/XAResource.html#recover(int)">recover</A></B>(int&nbsp;flag)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtains a list of prepared transaction branches from a resource manager.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/transaction/xa/XAResource.html#rollback(javax.transaction.xa.Xid)">rollback</A></B>(<A HREF="../../../javax/transaction/xa/Xid.html" title="interface in javax.transaction.xa">Xid</A>&nbsp;xid)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Informs the resource manager to roll back work done on behalf of a transaction branch.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/transaction/xa/XAResource.html#setTransactionTimeout(int)">setTransactionTimeout</A></B>(int&nbsp;seconds)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the current transaction timeout value for this <CODE>XAResource</CODE> instance.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/transaction/xa/XAResource.html#start(javax.transaction.xa.Xid, int)">start</A></B>(<A HREF="../../../javax/transaction/xa/Xid.html" title="interface in javax.transaction.xa">Xid</A>&nbsp;xid,      int&nbsp;flags)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Starts work on behalf of a transaction branch specified in <code>xid</code>.</TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="TMENDRSCAN"><!-- --></A><H3>TMENDRSCAN</H3><PRE>static final int <B>TMENDRSCAN</B></PRE><DL><DD>Ends a recovery scan.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.transaction.xa.XAResource.TMENDRSCAN">Constant Field Values</A></DL></DL><HR><A NAME="TMFAIL"><!-- --></A><H3>TMFAIL</H3><PRE>static final int <B>TMFAIL</B></PRE><DL><DD>Disassociates the caller and marks the transaction branch rollback-only.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.transaction.xa.XAResource.TMFAIL">Constant Field Values</A></DL></DL><HR><A NAME="TMJOIN"><!-- --></A><H3>TMJOIN</H3><PRE>static final int <B>TMJOIN</B></PRE><DL><DD>Caller is joining existing transaction branch.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.transaction.xa.XAResource.TMJOIN">Constant Field Values</A></DL></DL><HR><A NAME="TMNOFLAGS"><!-- --></A><H3>TMNOFLAGS</H3><PRE>static final int <B>TMNOFLAGS</B></PRE><DL><DD>Use TMNOFLAGS to indicate no flags value is selected.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.transaction.xa.XAResource.TMNOFLAGS">Constant Field Values</A></DL></DL><HR><A NAME="TMONEPHASE"><!-- --></A><H3>TMONEPHASE</H3><PRE>static final int <B>TMONEPHASE</B></PRE><DL><DD>Caller is using one-phase optimization.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.transaction.xa.XAResource.TMONEPHASE">Constant Field Values</A></DL></DL><HR><A NAME="TMRESUME"><!-- --></A><H3>TMRESUME</H3><PRE>static final int <B>TMRESUME</B></PRE><DL><DD>Caller is resuming association with a suspended transaction branch.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.transaction.xa.XAResource.TMRESUME">Constant Field Values</A></DL></DL><HR><A NAME="TMSTARTRSCAN"><!-- --></A><H3>TMSTARTRSCAN</H3><PRE>static final int <B>TMSTARTRSCAN</B></PRE><DL><DD>Starts a recovery scan.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.transaction.xa.XAResource.TMSTARTRSCAN">Constant Field Values</A></DL></DL><HR><A NAME="TMSUCCESS"><!-- --></A><H3>TMSUCCESS</H3><PRE>static final int <B>TMSUCCESS</B></PRE><DL><DD>Disassociates caller from a transaction branch.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.transaction.xa.XAResource.TMSUCCESS">Constant Field Values</A></DL></DL><HR><A NAME="TMSUSPEND"><!-- --></A><H3>TMSUSPEND</H3><PRE>static final int <B>TMSUSPEND</B></PRE><DL><DD>Caller is suspending (not ending) its association with a transaction branch.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.transaction.xa.XAResource.TMSUSPEND">Constant Field Values</A></DL></DL><HR><A NAME="XA_RDONLY"><!-- --></A><H3>XA_RDONLY</H3><PRE>static final int <B>XA_RDONLY</B></PRE><DL><DD>The transaction branch has been read-only and has been committed.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.transaction.xa.XAResource.XA_RDONLY">Constant Field Values</A></DL></DL><HR><A NAME="XA_OK"><!-- --></A><H3>XA_OK</H3><PRE>static final int <B>XA_OK</B></PRE><DL><DD>The transaction work has been prepared normally.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.transaction.xa.XAResource.XA_OK">Constant Field Values</A></DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="commit(javax.transaction.xa.Xid, boolean)"><!-- --></A><H3>commit</H3><PRE>void <B>commit</B>(<A HREF="../../../javax/transaction/xa/Xid.html" title="interface in javax.transaction.xa">Xid</A>&nbsp;xid,            boolean&nbsp;onePhase)            throws <A HREF="../../../javax/transaction/xa/XAException.html" title="class in javax.transaction.xa">XAException</A></PRE><DL><DD>Commits the global transaction specified by xid.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>xid</CODE> - A global transaction identifier<DD><CODE>onePhase</CODE> - If true, the resource manager should use a one-phase commit protocol to commit the work done on behalf of xid.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/transaction/xa/XAException.html" title="class in javax.transaction.xa">XAException</A></CODE> - An error has occurred. Possible XAExceptions are XA_HEURHAZ, XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO. <P>If the resource manager did not commit the transaction and the  parameter onePhase is set to true, the resource manager may throw  one of the XA_RB* exceptions. Upon return, the resource manager has  rolled back the branch's work and has released all held resources.</DL></DD></DL><HR><A NAME="end(javax.transaction.xa.Xid, int)"><!-- --></A><H3>end</H3><PRE>void <B>end</B>(<A HREF="../../../javax/transaction/xa/Xid.html" title="interface in javax.transaction.xa">Xid</A>&nbsp;xid,         int&nbsp;flags)         throws <A HREF="../../../javax/transaction/xa/XAException.html" title="class in javax.transaction.xa">XAException</A></PRE><DL><DD>Ends the work performed on behalf of a transaction branch. The resource manager disassociates the XA resource from the transaction branch specified and lets the transaction complete. <p>If TMSUSPEND is specified in the flags, the transaction branch is temporarily suspended in an incomplete state. The transaction context is in a suspended state and must be resumed via the <code>start</code> method with TMRESUME specified.</p> <p>If TMFAIL is specified, the portion of work has failed. The resource manager may mark the transaction as rollback-only</p> <p>If TMSUCCESS is specified, the portion of work has completed successfully.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>xid</CODE> - A global transaction identifier that is the same as the identifier used previously in the <code>start</code> method.<DD><CODE>flags</CODE> - One of TMSUCCESS, TMFAIL, or TMSUSPEND.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?