📄 transaction.html
字号:
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 transaction in the target object is inactive.<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="delistResource(javax.transaction.xa.XAResource, int)"><!-- --></A><H3>delistResource</H3><PRE>public boolean <B>delistResource</B>(<A HREF="../../javax/transaction/xa/XAResource.html" title="interface in javax.transaction.xa">XAResource</A> xaRes, int flag) 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>Disassociate the resource specified from the transaction associated with the target Transaction object.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>xaRes</CODE> - The XAResource object associated with the resource (connection).<DD><CODE>flag</CODE> - One of the values of TMSUCCESS, TMSUSPEND, or TMFAIL.<DT><B>Returns:</B><DD><i>true</i> if the resource was delisted successfully; otherwise <i>false</i>.<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 transaction in the target object is inactive.<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="enlistResource(javax.transaction.xa.XAResource)"><!-- --></A><H3>enlistResource</H3><PRE>public boolean <B>enlistResource</B>(<A HREF="../../javax/transaction/xa/XAResource.html" title="interface in javax.transaction.xa">XAResource</A> xaRes) throws <A HREF="../../javax/transaction/RollbackException.html" title="class in javax.transaction">RollbackException</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>Enlist the resource specified with the transaction associated with the target Transaction object.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>xaRes</CODE> - The XAResource object associated with the resource (connection).<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" title="class in javax.transaction">RollbackException</A></CODE> - Thrown to indicate that the transaction has been marked for rollback only.<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 transaction in the target object is in the prepared state or the transaction is inactive.<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 target Transaction object.<P><DD><DL><DT><B>Returns:</B><DD>The transaction status. If no transaction is associated with the target object, 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="registerSynchronization(javax.transaction.Synchronization)"><!-- --></A><H3>registerSynchronization</H3><PRE>public void <B>registerSynchronization</B>(<A HREF="../../javax/transaction/Synchronization.html" title="interface in javax.transaction">Synchronization</A> sync) throws <A HREF="../../javax/transaction/RollbackException.html" title="class in javax.transaction">RollbackException</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>Register a synchronization object for the transaction currently associated with the target object. The transction manager invokes the beforeCompletion method prior to starting the two-phase transaction commit process. After the transaction is completed, the transaction manager invokes the afterCompletion method.<P><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" title="class in javax.transaction">RollbackException</A></CODE> - Thrown to indicate that the transaction has been marked for rollback only.<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 transaction in the target object is in the prepared state or the transaction is inactive.<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="../../javax/transaction/SystemException.html" title="class in javax.transaction">SystemException</A></PRE><DL><DD>Rollback the transaction represented by this Transaction object.<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 transaction in the target object is in the prepared state or the transaction is inactive.<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 target object 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 target object is not associated with any 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><!-- ========= 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"> <A HREF="../../javax/transaction/Synchronization.html" title="interface in javax.transaction"><B>PREV CLASS</B></A> <A HREF="../../javax/transaction/TransactionManager.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> <A HREF="Transaction.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 | 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><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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -