src/share/classes/javax/transaction/xa/XAException.java

Wed, 26 Feb 2014 14:43:56 -0800

author
katleman
date
Wed, 26 Feb 2014 14:43:56 -0800
changeset 589
abe5b0157c36
parent 158
91006f157c46
child 748
6845b95cba6b
permissions
-rw-r--r--

Added tag jdk8u20-b03 for changeset 9059a1c85704

     1 /*
     2  * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     8  * particular file as subject to the "Classpath" exception as provided
     9  * by Oracle in the LICENSE file that accompanied this code.
    10  *
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    14  * version 2 for more details (a copy is included in the LICENSE file that
    15  * accompanied this code).
    16  *
    17  * You should have received a copy of the GNU General Public License version
    18  * 2 along with this work; if not, write to the Free Software Foundation,
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    20  *
    21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    22  * or visit www.oracle.com if you need additional information or have any
    23  * questions.
    24  */
    26 package javax.transaction.xa;
    28 /**
    29  * The XAException is thrown by the Resource Manager (RM) to inform the
    30  * Transaction Manager of an error encountered by the involved transaction.
    31  *
    32  */
    33 public class XAException extends java.lang.Exception {
    35     /**
    36     * The error code with which to create the SystemException.
    37     *
    38     * @serial The error code for the exception
    39      */
    41     public int errorCode;
    43     /**
    44      * Create an XAException.
    45      */
    46     public XAException()
    47     {
    48         super();
    49     }
    51     /**
    52      * Create an XAException with a given string.
    53      *
    54      * @param s The <code>String</code> object containing the exception
    55      *          message.
    56      */
    57     public XAException(String s)
    58     {
    59         super(s);
    60     }
    62     /**
    63      * Create an XAException with a given error code.
    64      *
    65      * @param errcode The error code identifying the exception.
    66      */
    67     public XAException(int errcode)
    68     {
    69         super();
    70         errorCode = errcode;
    71     }
    73     /**
    74      * The inclusive lower bound of the rollback codes.
    75      */
    76     public final static int XA_RBBASE = 100;
    78     /**
    79      * Indicates that the rollback was caused by an unspecified reason.
    80      */
    81     public final static int XA_RBROLLBACK = XA_RBBASE;
    83     /**
    84      * Indicates that the rollback was caused by a communication failure.
    85      */
    86     public final static int XA_RBCOMMFAIL = XA_RBBASE + 1;
    88     /**
    89      * A deadlock was detected.
    90      */
    91     public final static int XA_RBDEADLOCK = XA_RBBASE + 2;
    93     /**
    94      * A condition that violates the integrity of the resource was detected.
    95      */
    96     public final static int XA_RBINTEGRITY = XA_RBBASE + 3;
    98     /**
    99      * The resource manager rolled back the transaction branch for a reason
   100      * not on this list.
   101      */
   102     public final static int XA_RBOTHER = XA_RBBASE + 4;
   104     /**
   105      * A protocol error occurred in the resource manager.
   106      */
   107     public final static int XA_RBPROTO = XA_RBBASE + 5;
   109     /**
   110      * A transaction branch took too long.
   111      */
   112     public final static int XA_RBTIMEOUT = XA_RBBASE + 6;
   114     /**
   115      * May retry the transaction branch.
   116      */
   117     public final static int XA_RBTRANSIENT = XA_RBBASE + 7;
   119     /**
   120      * The inclusive upper bound of the rollback error code.
   121      */
   122     public final static int XA_RBEND = XA_RBTRANSIENT;
   124     /**
   125      * Resumption must occur where the suspension occurred.
   126      */
   127     public final static int XA_NOMIGRATE = 9;
   129     /**
   130      * The transaction branch may have been heuristically completed.
   131      */
   132     public final static int XA_HEURHAZ = 8;
   134     /**
   135      * The transaction branch has been heuristically committed.
   136      */
   137     public final static int XA_HEURCOM = 7;
   139     /**
   140      * The transaction branch has been heuristically rolled back.
   141      */
   142     public final static int XA_HEURRB = 6;
   144     /**
   145      * The transaction branch has been heuristically committed and
   146      * rolled back.
   147      */
   148     public final static int XA_HEURMIX = 5;
   150     /**
   151      * Routine returned with no effect and may be reissued.
   152      */
   153     public final static int XA_RETRY = 4;
   155     /**
   156      * The transaction branch was read-only and has been committed.
   157      */
   158     public final static int XA_RDONLY = 3;
   160     /**
   161      * There is an asynchronous operation already outstanding.
   162      */
   163     public final static int XAER_ASYNC = -2;
   165     /**
   166      * A resource manager error has occurred in the transaction branch.
   167      */
   168     public final static int XAER_RMERR = -3;
   170     /**
   171      * The XID is not valid.
   172      */
   173     public final static int XAER_NOTA = -4;
   175     /**
   176      * Invalid arguments were given.
   177      */
   178     public final static int XAER_INVAL = -5;
   180     /**
   181      * Routine was invoked in an inproper context.
   182      */
   183     public final static int XAER_PROTO = -6;
   185     /**
   186      * Resource manager is unavailable.
   187      */
   188     public final static int XAER_RMFAIL = -7;
   190     /**
   191      * The XID already exists.
   192      */
   193     public final static int XAER_DUPID = -8;
   195     /**
   196      * The resource manager is doing work outside a global transaction.
   197      */
   198     public final static int XAER_OUTSIDE = -9;
   201 }

mercurial