xaresource.html
来自「j2ee的API 1.4版本,j2ee的帮助文档」· HTML 代码 · 共 815 行 · 第 1/3 页
HTML
815 行
<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.<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 XAException values are XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, XAER_PROTO, or XA_RB*.</DL></DD></DL><HR><A NAME="forget(javax.transaction.xa.Xid)"><!-- --></A><H3>forget</H3><PRE>public void <B>forget</B>(<A HREF="../../../javax/transaction/xa/Xid.html" title="interface in javax.transaction.xa">Xid</A> xid) throws <A HREF="../../../javax/transaction/xa/XAException.html" title="class in javax.transaction.xa">XAException</A></PRE><DL><DD>Tells the resource manager to forget about a heuristically completed transaction branch.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>xid</CODE> - A global transaction identifier.<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 exception values are XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.</DL></DD></DL><HR><A NAME="getTransactionTimeout()"><!-- --></A><H3>getTransactionTimeout</H3><PRE>public int <B>getTransactionTimeout</B>() throws <A HREF="../../../javax/transaction/xa/XAException.html" title="class in javax.transaction.xa">XAException</A></PRE><DL><DD>Obtains the current transaction timeout value set for this XAResource instance. If <CODE>XAResource.setTransactionTimeout</CODE> was not used prior to invoking this method, the return value is the default timeout set for the resource manager; otherwise, the value used in the previous <CODE>setTransactionTimeout</CODE> call is returned.<P><DD><DL><DT><B>Returns:</B><DD>the transaction timeout value in seconds.<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 exception values are XAER_RMERR and XAER_RMFAIL.</DL></DD></DL><HR><A NAME="isSameRM(javax.transaction.xa.XAResource)"><!-- --></A><H3>isSameRM</H3><PRE>public boolean <B>isSameRM</B>(<A HREF="../../../javax/transaction/xa/XAResource.html" title="interface in javax.transaction.xa">XAResource</A> xares) throws <A HREF="../../../javax/transaction/xa/XAException.html" title="class in javax.transaction.xa">XAException</A></PRE><DL><DD>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>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>xares</CODE> - An XAResource object whose resource manager instance is to be compared with the resource manager instance of the target object.<DT><B>Returns:</B><DD><i>true</i> if it's the same RM instance; otherwise <i>false</i>.<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 exception values are XAER_RMERR and XAER_RMFAIL.</DL></DD></DL><HR><A NAME="prepare(javax.transaction.xa.Xid)"><!-- --></A><H3>prepare</H3><PRE>public int <B>prepare</B>(<A HREF="../../../javax/transaction/xa/Xid.html" title="interface in javax.transaction.xa">Xid</A> xid) throws <A HREF="../../../javax/transaction/xa/XAException.html" title="class in javax.transaction.xa">XAException</A></PRE><DL><DD>Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>xid</CODE> - A global transaction identifier.<DT><B>Returns:</B><DD>A value indicating the resource manager's vote on the outcome of the transaction. The possible values are: XA_RDONLY or XA_OK. If the resource manager wants to roll back the transaction, it should do so by raising an appropriate XAException in the prepare method.<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 exception values are: XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.</DL></DD></DL><HR><A NAME="recover(int)"><!-- --></A><H3>recover</H3><PRE>public <A HREF="../../../javax/transaction/xa/Xid.html" title="interface in javax.transaction.xa">Xid</A>[] <B>recover</B>(int flag) throws <A HREF="../../../javax/transaction/xa/XAException.html" title="class in javax.transaction.xa">XAException</A></PRE><DL><DD>Obtains a list of prepared transaction branches from a resource manager. The transaction manager calls this method during recovery to obtain the list of transaction branches that are currently in prepared or heuristically completed states.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>flag</CODE> - One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGS must be used when no other flags are set in the parameter.<DT><B>Returns:</B><DD>The resource manager returns zero or more XIDs of the transaction branches that are currently in a prepared or heuristically completed state. If an error occurs during the operation, the resource manager should throw the appropriate XAException.<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 values are XAER_RMERR, XAER_RMFAIL, XAER_INVAL, and XAER_PROTO.</DL></DD></DL><HR><A NAME="rollback(javax.transaction.xa.Xid)"><!-- --></A><H3>rollback</H3><PRE>public void <B>rollback</B>(<A HREF="../../../javax/transaction/xa/Xid.html" title="interface in javax.transaction.xa">Xid</A> xid) throws <A HREF="../../../javax/transaction/xa/XAException.html" title="class in javax.transaction.xa">XAException</A></PRE><DL><DD>Informs the resource manager to roll back work done on behalf of a transaction branch.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>xid</CODE> - A global transaction identifier.<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 transaction branch is already marked rollback-only 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="setTransactionTimeout(int)"><!-- --></A><H3>setTransactionTimeout</H3><PRE>public boolean <B>setTransactionTimeout</B>(int seconds) throws <A HREF="../../../javax/transaction/xa/XAException.html" title="class in javax.transaction.xa">XAException</A></PRE><DL><DD><P>Sets the current transaction timeout value for this <CODE>XAResource</CODE> instance. Once set, this timeout value is effective until <code>setTransactionTimeout</code> is invoked again with a different value. To reset the timeout value to the default value used by the resource manager, set the value to zero. If the timeout operation is performed successfully, the method returns <i>true</i>; otherwise <i>false</i>. If a resource manager does not support explicitly setting the transaction timeout value, this method returns <i>false</i>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>seconds</CODE> - The transaction timeout value in seconds.<DT><B>Returns:</B><DD><i>true</i> if the transaction timeout value is set successfully; otherwise <i>false</i>.<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 exception values are XAER_RMERR, XAER_RMFAIL, or XAER_INVAL.</DL></DD></DL><HR><A NAME="start(javax.transaction.xa.Xid, int)"><!-- --></A><H3>start</H3><PRE>public void <B>start</B>(<A HREF="../../../javax/transaction/xa/Xid.html" title="interface in javax.transaction.xa">Xid</A> xid, int flags) throws <A HREF="../../../javax/transaction/xa/XAException.html" title="class in javax.transaction.xa">XAException</A></PRE><DL><DD>Starts work on behalf of a transaction branch specified in <code>xid</code>. If TMJOIN is specified, the start applies to joining a transaction previously seen by the resource manager. If TMRESUME is specified, the start applies to resuming a suspended transaction specified in the parameter <code>xid</code>. If neither TMJOIN nor TMRESUME is specified and the transaction specified by <code>xid</code> has previously been seen by the resource manager, the resource manager throws the XAException exception with XAER_DUPID error code.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>xid</CODE> - A global transaction identifier to be associated with the resource.<DD><CODE>flags</CODE> - One of TMNOFLAGS, TMJOIN, or TMRESUME.<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 exceptions are XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_DUPID, XAER_OUTSIDE, XAER_NOTA, XAER_INVAL, or XAER_PROTO.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../../../javax/transaction/xa/Xid.html" title="interface in javax.transaction.xa"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="XAResource.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?