transactionmanager.html

来自「j2ee api,很好的api。我这现在有」· HTML 代码 · 共 495 行 · 第 1/2 页

HTML
495
字号
                   <A HREF="../../javax/transaction/SystemException.html" title="class in javax.transaction">SystemException</A></PRE><DL><DD>Complete the transaction associated with the current thread. When this method completes, the thread is no longer associated with a transaction.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../javax/transaction/RollbackException.html" title="class in javax.transaction">RollbackException</A></CODE> - Thrown to indicate that    the transaction has been rolled back rather than committed.<DD><CODE><A HREF="../../javax/transaction/HeuristicMixedException.html" title="class in javax.transaction">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" title="class in javax.transaction">HeuristicRollbackException</A></CODE> - Thrown to indicate that a    heuristic decision was made and that all relevant updates have been    rolled back.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang">SecurityException</A></CODE> - Thrown to indicate that the thread is    not allowed to commit the transaction.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - Thrown if the current thread is    not associated with a transaction.<DD><CODE><A HREF="../../javax/transaction/SystemException.html" title="class in javax.transaction">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" title="class in javax.transaction">SystemException</A></PRE><DL><DD>Obtain the status of the transaction associated with the current thread.<P><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" title="class in javax.transaction">SystemException</A></CODE> - Thrown if the transaction manager    encounters an unexpected error condition.</DL></DD></DL><HR><A NAME="getTransaction()"><!-- --></A><H3>getTransaction</H3><PRE>public <A HREF="../../javax/transaction/Transaction.html" title="interface in javax.transaction">Transaction</A> <B>getTransaction</B>()                           throws <A HREF="../../javax/transaction/SystemException.html" title="class in javax.transaction">SystemException</A></PRE><DL><DD>Get the transaction object that represents the transaction context of the calling thread.<P><DD><DL><DT><B>Returns:</B><DD>the <code>Transaction</code> object representing the	  transaction associated with the calling thread.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/transaction/SystemException.html" title="class in javax.transaction">SystemException</A></CODE> - Thrown if the transaction manager    encounters an unexpected error condition.</DL></DD></DL><HR><A NAME="resume(javax.transaction.Transaction)"><!-- --></A><H3>resume</H3><PRE>public void <B>resume</B>(<A HREF="../../javax/transaction/Transaction.html" title="interface in javax.transaction">Transaction</A>&nbsp;tobj)            throws <A HREF="../../javax/transaction/InvalidTransactionException.html" title="class in javax.transaction">InvalidTransactionException</A>,                   <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A>,                   <A HREF="../../javax/transaction/SystemException.html" title="class in javax.transaction">SystemException</A></PRE><DL><DD>Resume the transaction context association of the calling thread with the transaction represented by the supplied Transaction object. When this method returns, the calling thread is associated with the transaction context specified.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>tobj</CODE> - The <code>Transaction</code> object that represents the    transaction to be resumed.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/transaction/InvalidTransactionException.html" title="class in javax.transaction">InvalidTransactionException</A></CODE> - Thrown if the parameter    transaction object contains an invalid transaction.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - Thrown if the thread is already    associated with another transaction.<DD><CODE><A HREF="../../javax/transaction/SystemException.html" title="class in javax.transaction">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 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A>,                     <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang">SecurityException</A>,                     <A HREF="../../javax/transaction/SystemException.html" title="class in javax.transaction">SystemException</A></PRE><DL><DD>Roll back the transaction associated with the current thread. When this method completes, the thread is no longer associated with a transaction.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang">SecurityException</A></CODE> - Thrown to indicate that the thread is    not allowed to roll back the transaction.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - Thrown if the current thread is    not associated with a transaction.<DD><CODE><A HREF="../../javax/transaction/SystemException.html" title="class in javax.transaction">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 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A>,                            <A HREF="../../javax/transaction/SystemException.html" title="class in javax.transaction">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.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - Thrown if the current thread is    not associated with a transaction.<DD><CODE><A HREF="../../javax/transaction/SystemException.html" title="class in javax.transaction">SystemException</A></CODE> - Thrown if the transaction manager    encounters an unexpected error condition.</DL></DD></DL><HR><A NAME="setTransactionTimeout(int)"><!-- --></A><H3>setTransactionTimeout</H3><PRE>public void <B>setTransactionTimeout</B>(int&nbsp;seconds)                           throws <A HREF="../../javax/transaction/SystemException.html" title="class in javax.transaction">SystemException</A></PRE><DL><DD>Modify the timeout value that is associated with transactions started by subsequent invocations of the begin method. <p> If an application has not called this method, the transaction service uses some default value for the transaction timeout.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>seconds</CODE> - The value of the timeout in seconds. If the value is zero,        the transaction service restores the default value. If the value        is negative a SystemException is thrown.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/transaction/SystemException.html" title="class in javax.transaction">SystemException</A></CODE> - Thrown if the transaction manager    encounters an unexpected error condition.</DL></DD></DL><HR><A NAME="suspend()"><!-- --></A><H3>suspend</H3><PRE>public <A HREF="../../javax/transaction/Transaction.html" title="interface in javax.transaction">Transaction</A> <B>suspend</B>()                    throws <A HREF="../../javax/transaction/SystemException.html" title="class in javax.transaction">SystemException</A></PRE><DL><DD>Suspend the transaction currently associated with the calling thread and return a Transaction object that represents the transaction context being suspended. If the calling thread is not associated with a transaction, the method returns a null object reference. When this method returns, the calling thread is not associated with a transaction.<P><DD><DL><DT><B>Returns:</B><DD>Transaction object representing the suspended transaction.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/transaction/SystemException.html" title="class in javax.transaction">SystemException</A></CODE> - Thrown if the transaction manager    encounters an unexpected error condition.</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>&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><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">&nbsp;<A HREF="../../javax/transaction/Transaction.html" title="interface in javax.transaction"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../javax/transaction/UserTransaction.html" title="interface in javax.transaction"><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="TransactionManager.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&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><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 + -
显示快捷键?