xaresource.html
来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 671 行 · 第 1/2 页
HTML
671 行
TMJOIN</H3>
<PRE>
public static final int <B>TMJOIN</B></PRE>
<DL>
<DD>Caller is joining existing transaction branch.</DL>
<HR>
<A NAME="TMNOFLAGS"><!-- --></A><H3>
TMNOFLAGS</H3>
<PRE>
public static final int <B>TMNOFLAGS</B></PRE>
<DL>
<DD>Use TMNOFLAGS to indicate no flags value is selected.</DL>
<HR>
<A NAME="TMONEPHASE"><!-- --></A><H3>
TMONEPHASE</H3>
<PRE>
public static final int <B>TMONEPHASE</B></PRE>
<DL>
<DD>Caller is using one-phase optimization.</DL>
<HR>
<A NAME="TMRESUME"><!-- --></A><H3>
TMRESUME</H3>
<PRE>
public static final int <B>TMRESUME</B></PRE>
<DL>
<DD>Caller is resuming association with with suspended
transaction branch.</DL>
<HR>
<A NAME="TMSTARTRSCAN"><!-- --></A><H3>
TMSTARTRSCAN</H3>
<PRE>
public static final int <B>TMSTARTRSCAN</B></PRE>
<DL>
<DD>Start a recovery scan.</DL>
<HR>
<A NAME="TMSUCCESS"><!-- --></A><H3>
TMSUCCESS</H3>
<PRE>
public static final int <B>TMSUCCESS</B></PRE>
<DL>
<DD>Disassociate caller from transaction branch.</DL>
<HR>
<A NAME="TMSUSPEND"><!-- --></A><H3>
TMSUSPEND</H3>
<PRE>
public static final int <B>TMSUSPEND</B></PRE>
<DL>
<DD>Caller is suspending (not ending) association with
transaction branch.</DL>
<HR>
<A NAME="XA_RDONLY"><!-- --></A><H3>
XA_RDONLY</H3>
<PRE>
public static final int <B>XA_RDONLY</B></PRE>
<DL>
<DD>The transaction branch has been read-only and has been committed.</DL>
<HR>
<A NAME="XA_OK"><!-- --></A><H3>
XA_OK</H3>
<PRE>
public static final int <B>XA_OK</B></PRE>
<DL>
<DD>The transaction work has been prepared normally.</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="commit(javax.transaction.xa.Xid, boolean)"><!-- --></A><H3>
commit</H3>
<PRE>
public void <B>commit</B>(<A HREF="../../../javax/transaction/xa/Xid.html">Xid</A> xid,
boolean onePhase)
throws <A HREF="../../../javax/transaction/xa/XAException.html">XAException</A></PRE>
<DL>
<DD>Commit the global transaction specified by xid.<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">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
paramether 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>
public void <B>end</B>(<A HREF="../../../javax/transaction/xa/Xid.html">Xid</A> xid,
int flags)
throws <A HREF="../../../javax/transaction/xa/XAException.html">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 let the transaction be
completed.
<p>If TMSUSPEND is specified in flags, the transaction branch
is temporarily suspended in incomplete state. The transaction
context is in suspened state and must be resumed via start
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><DD><DL>
<DT><B>Parameters:</B><DD><CODE>xid</CODE> - A global transaction identifier that is the same as
what was used previously in the start method.<DD><CODE>flags</CODE> - One of TMSUCCESS, TMFAIL, or TMSUSPEND<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/transaction/xa/XAException.html">XAException</A></CODE> - An error has occurred. Possible XAException
values are XAER_RMERR, XAER_RMFAILED, 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">Xid</A> xid)
throws <A HREF="../../../javax/transaction/xa/XAException.html">XAException</A></PRE>
<DL>
<DD>Tell the resource manager to forget about a heuristically
completed transaction branch.<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">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">XAException</A></PRE>
<DL>
<DD>Obtain the current transaction timeout value set for this
XAResource instance. If <CODE>XAResource.setTransactionTimeout</CODE>
was not use 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.<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">XAException</A></CODE> - An error has occurred. Possible exception
values are XAER_RMERR, 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">XAResource</A> xares)
throws <A HREF="../../../javax/transaction/xa/XAException.html">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>.<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">XAException</A></CODE> - An error has occurred. Possible exception
values are XAER_RMERR, 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">Xid</A> xid)
throws <A HREF="../../../javax/transaction/xa/XAException.html">XAException</A></PRE>
<DL>
<DD>Ask the resource manager to prepare for a transaction commit
of the transaction specified in xid.<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">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">Xid</A>[] <B>recover</B>(int flag)
throws <A HREF="../../../javax/transaction/xa/XAException.html">XAException</A></PRE>
<DL>
<DD>Obtain 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.<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 flags.<DT><B>Returns:</B><DD>The resource manager returns zero or more XIDs for 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">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">Xid</A> xid)
throws <A HREF="../../../javax/transaction/xa/XAException.html">XAException</A></PRE>
<DL>
<DD>Inform the resource manager to roll back work done on behalf
of a transaction branch<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">XAException</A></CODE> - An error has occurred</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">XAException</A></PRE>
<DL>
<DD><P>Set 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 transaction timeout value to be set explicitly, this method
returns <i>false</i>.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>the</CODE> - transaction timeout value in seconds.<DT><B>Returns:</B><DD><i>true</i> if transaction timeout value is set successfully;
otherwise <i>false</i>.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/transaction/xa/XAException.html">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">Xid</A> xid,
int flags)
throws <A HREF="../../../javax/transaction/xa/XAException.html">XAException</A></PRE>
<DL>
<DD>Start work on behalf of a transaction branch specified in xid
If TMJOIN is specified, the start is for joining a transaction
previously seen by the resource manager. If TMRESUME is specified,
the start is to resume a suspended transaction specified in the
parameter xid.
If neither TMJOIN nor TMRESUME is specified and the transaction
specified by xid has previously been seen by the resource manager,
the resource manager throws the XAException exception with
XAER_DUPID error code.<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">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 NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<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>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
<A HREF="../../../javax/transaction/xa/Xid.html"><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></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | <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>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?