transactionmanager.html
来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 397 行 · 第 1/2 页
HTML
397 行
</DL>
<HR>
<A NAME="commit()"><!-- --></A><H3>
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,
java.lang.IllegalStateException,
<A HREF="../../javax/transaction/SystemException.html">SystemException</A></PRE>
<DL>
<DD>Complete the transaction associated with the current thread. When this
method completes, the thread becomes associated with no transaction.<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="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="getTransaction()"><!-- --></A><H3>
getTransaction</H3>
<PRE>
public <A HREF="../../javax/transaction/Transaction.html">Transaction</A> <B>getTransaction</B>()
throws <A HREF="../../javax/transaction/SystemException.html">SystemException</A></PRE>
<DL>
<DD>Get the transaction object that represents the transaction
context of the calling thread<DD><DL>
<DT><B>Returns:</B><DD>the Transaction object representing the transaction
associated with the calling thread.<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="resume(javax.transaction.Transaction)"><!-- --></A><H3>
resume</H3>
<PRE>
public void <B>resume</B>(<A HREF="../../javax/transaction/Transaction.html">Transaction</A> tobj)
throws <A HREF="../../javax/transaction/InvalidTransactionException.html">InvalidTransactionException</A>,
java.lang.IllegalStateException,
<A HREF="../../javax/transaction/SystemException.html">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.<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">InvalidTransactionException</A></CODE> - Thrown if the parameter
transaction object contains an invalid transaction<DD><CODE>java.lang.IllegalStateException</CODE> - Thrown if the thread is already
associated with another 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="rollback()"><!-- --></A><H3>
rollback</H3>
<PRE>
public void <B>rollback</B>()
throws java.lang.IllegalStateException,
java.lang.SecurityException,
<A HREF="../../javax/transaction/SystemException.html">SystemException</A></PRE>
<DL>
<DD>Roll back the transaction associated with the current thread. When this
method completes, the thread becomes associated with no transaction.<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.lang.SecurityException</CODE> - Thrown to indicate that the thread is
not allowed to roll back 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="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 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="setTransactionTimeout(int)"><!-- --></A><H3>
setTransactionTimeout</H3>
<PRE>
public void <B>setTransactionTimeout</B>(int seconds)
throws <A HREF="../../javax/transaction/SystemException.html">SystemException</A></PRE>
<DL>
<DD>Modify the value of the timeout value that is associated with the
transactions started by the current thread with the begin method.
<p> If an application has not called this method, the transaction
service uses some default value for the transaction timeout.<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.<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="suspend()"><!-- --></A><H3>
suspend</H3>
<PRE>
public <A HREF="../../javax/transaction/Transaction.html">Transaction</A> <B>suspend</B>()
throws <A HREF="../../javax/transaction/SystemException.html">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 associated with no transaction.<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">SystemException</A></CODE> - Thrown if the transaction manager
encounters an unexpected error condition<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> </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">
<A HREF="../../javax/transaction/Transaction.html"><B>PREV CLASS</B></A>
<A HREF="../../javax/transaction/UserTransaction.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="TransactionManager.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?