transaction.html

来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 348 行 · 第 1/2 页

HTML
348
字号
commit</H3>
<PRE>
public void <B>commit</B>()
            throws <A HREF="../../javax/transaction/RollbackException.html">RollbackException</A>,
                   <A HREF="../../javax/transaction/HeuristicMixedException.html">HeuristicMixedException</A>,
                   <A HREF="../../javax/transaction/HeuristicRollbackException.html">HeuristicRollbackException</A>,
                   java.lang.SecurityException,
                   <A HREF="../../javax/transaction/SystemException.html">SystemException</A></PRE>
<DL>
<DD>Complete the transaction represented by this Transaction object<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/transaction/RollbackException.html">RollbackException</A></CODE> - Thrown to indicate that
    the transaction has been rolled back rather than committed.<DD><CODE><A HREF="../../javax/transaction/HeuristicMixedException.html">HeuristicMixedException</A></CODE> - Thrown to indicate that a heuristic 
    decision was made and that some relevant updates have been committed
    while others have been rolled back.<DD><CODE><A HREF="../../javax/transaction/HeuristicRollbackException.html">HeuristicRollbackException</A></CODE> - Thrown to indicate that a 
    heuristic decision was made and that some relevant updates have been
    rolled back.<DD><CODE>java.lang.SecurityException</CODE> - Thrown to indicate that the thread is
    not allowed to commit the transaction.<DD><CODE>java.lang.IllegalStateException</CODE> - Thrown if the current thread is
    not associated with a transaction.<DD><CODE><A HREF="../../javax/transaction/SystemException.html">SystemException</A></CODE> - Thrown if the transaction manager 
    encounters an unexpected error condition</DL>
</DD>
</DL>
<HR>

<A NAME="delistResource(javax.transaction.xa.XAResource, int)"><!-- --></A><H3>
delistResource</H3>
<PRE>
public boolean <B>delistResource</B>(<A HREF="../../javax/transaction/xa/XAResource.html">XAResource</A>&nbsp;xaRes,
                              int&nbsp;flag)
                       throws java.lang.IllegalStateException,
                              <A HREF="../../javax/transaction/SystemException.html">SystemException</A></PRE>
<DL>
<DD>Delist the resource specified from the current transaction 
 associated with the calling thread.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xaRes</CODE> - The XAResource object representing the resource to delist<DD><CODE>flag</CODE> - One of the values of TMSUCCESS, TMSUSPEND, or TMFAIL.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - Thrown if the transaction in the 
    target object is inactive.<DD><CODE><A HREF="../../javax/transaction/SystemException.html">SystemException</A></CODE> - Thrown if the transaction manager 
    encounters an unexpected error condition</DL>
</DD>
</DL>
<HR>

<A NAME="enlistResource(javax.transaction.xa.XAResource)"><!-- --></A><H3>
enlistResource</H3>
<PRE>
public boolean <B>enlistResource</B>(<A HREF="../../javax/transaction/xa/XAResource.html">XAResource</A>&nbsp;xaRes)
                       throws <A HREF="../../javax/transaction/RollbackException.html">RollbackException</A>,
                              java.lang.IllegalStateException,
                              <A HREF="../../javax/transaction/SystemException.html">SystemException</A></PRE>
<DL>
<DD>Enlist the resource specified with the current transaction 
 context of the calling thread<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xaRes</CODE> - The XAResource object representing the resource to delist<DT><B>Returns:</B><DD><i>true</i> if the resource was enlisted successfully; otherwise 
    <i>false</i>.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/transaction/RollbackException.html">RollbackException</A></CODE> - Thrown to indicate that
    the transaction has been marked for rollback only.<DD><CODE>java.lang.IllegalStateException</CODE> - Thrown if the transaction in the 
    target object is in prepared state or the transaction is inactive.<DD><CODE><A HREF="../../javax/transaction/SystemException.html">SystemException</A></CODE> - Thrown if the transaction manager 
    encounters an unexpected error condition</DL>
</DD>
</DL>
<HR>

<A NAME="getStatus()"><!-- --></A><H3>
getStatus</H3>
<PRE>
public int <B>getStatus</B>()
              throws <A HREF="../../javax/transaction/SystemException.html">SystemException</A></PRE>
<DL>
<DD>Obtain the status of the transaction associated with the current thread.<DD><DL>
<DT><B>Returns:</B><DD>The transaction status. If no transaction is associated with 
    the current thread, this method returns the Status.NoTransaction 
    value.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/transaction/SystemException.html">SystemException</A></CODE> - Thrown if the transaction manager 
    encounters an unexpected error condition</DL>
</DD>
</DL>
<HR>

<A NAME="registerSynchronization(javax.transaction.Synchronization)"><!-- --></A><H3>
registerSynchronization</H3>
<PRE>
public void <B>registerSynchronization</B>(<A HREF="../../javax/transaction/Synchronization.html">Synchronization</A>&nbsp;sync)
                             throws <A HREF="../../javax/transaction/RollbackException.html">RollbackException</A>,
                                    java.lang.IllegalStateException,
                                    <A HREF="../../javax/transaction/SystemException.html">SystemException</A></PRE>
<DL>
<DD>Register a synchronization object for the transaction currently
 associated with the calling thread. The transction manager invokes
 the beforeCompletion method prior to starting the transaction 
 commit process. After the transaction is completed, the transaction
 manager invokes the afterCompletion method.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sync</CODE> - The Synchronization object for the transaction associated
    with the target object<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/transaction/RollbackException.html">RollbackException</A></CODE> - Thrown to indicate that
    the transaction has been marked for rollback only.<DD><CODE>java.lang.IllegalStateException</CODE> - Thrown if the transaction in the 
    target object is in prepared state or the transaction is inactive.<DD><CODE><A HREF="../../javax/transaction/SystemException.html">SystemException</A></CODE> - Thrown if the transaction manager 
    encounters an unexpected error condition</DL>
</DD>
</DL>
<HR>

<A NAME="rollback()"><!-- --></A><H3>
rollback</H3>
<PRE>
public void <B>rollback</B>()
              throws java.lang.IllegalStateException,
                     <A HREF="../../javax/transaction/SystemException.html">SystemException</A></PRE>
<DL>
<DD>Rollback the transaction represented by this Transaction object.<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - Thrown if the transaction in the 
    target object is in prepared state or the transaction is inactive.<DD><CODE><A HREF="../../javax/transaction/SystemException.html">SystemException</A></CODE> - Thrown if the transaction manager 
    encounters an unexpected error condition</DL>
</DD>
</DL>
<HR>

<A NAME="setRollbackOnly()"><!-- --></A><H3>
setRollbackOnly</H3>
<PRE>
public void <B>setRollbackOnly</B>()
                     throws java.lang.IllegalStateException,
                            <A HREF="../../javax/transaction/SystemException.html">SystemException</A></PRE>
<DL>
<DD>Modify the transaction associated with the current thread such that
 the only possible outcome of the transaction is to roll back the
 transaction.<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - Thrown if the current thread is
    not associated with any transaction.<DD><CODE><A HREF="../../javax/transaction/SystemException.html">SystemException</A></CODE> - Thrown if the transaction manager 
    encounters an unexpected error condition</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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../javax/transaction/Synchronization.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../javax/transaction/TransactionManager.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>  &nbsp;
&nbsp;<A HREF="Transaction.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>

</BODY>
</HTML>

⌨️ 快捷键说明

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