0N/A/*
157N/A * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
157N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
157N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
157N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
157N/A * or visit www.oracle.com if you need additional information or have any
157N/A * questions.
0N/A */
0N/A
0N/Apackage javax.transaction.xa;
0N/A
0N/A/**
0N/A * The XAException is thrown by the Resource Manager (RM) to inform the
0N/A * Transaction Manager of an error encountered by the involved transaction.
0N/A *
0N/A */
0N/Apublic class XAException extends java.lang.Exception {
0N/A
0N/A /**
0N/A * The error code with which to create the SystemException.
0N/A *
0N/A * @serial The error code for the exception
0N/A */
0N/A
0N/A public int errorCode;
0N/A
0N/A /**
0N/A * Create an XAException.
0N/A */
0N/A public XAException()
0N/A {
0N/A super();
0N/A }
0N/A
0N/A /**
0N/A * Create an XAException with a given string.
0N/A *
0N/A * @param s The <code>String</code> object containing the exception
0N/A * message.
0N/A */
0N/A public XAException(String s)
0N/A {
0N/A super(s);
0N/A }
0N/A
0N/A /**
0N/A * Create an XAException with a given error code.
0N/A *
0N/A * @param errcode The error code identifying the exception.
0N/A */
0N/A public XAException(int errcode)
0N/A {
0N/A super();
0N/A errorCode = errcode;
0N/A }
0N/A
0N/A /**
0N/A * The inclusive lower bound of the rollback codes.
0N/A */
0N/A public final static int XA_RBBASE = 100;
0N/A
0N/A /**
0N/A * Indicates that the rollback was caused by an unspecified reason.
0N/A */
0N/A public final static int XA_RBROLLBACK = XA_RBBASE;
0N/A
0N/A /**
0N/A * Indicates that the rollback was caused by a communication failure.
0N/A */
0N/A public final static int XA_RBCOMMFAIL = XA_RBBASE + 1;
0N/A
0N/A /**
0N/A * A deadlock was detected.
0N/A */
0N/A public final static int XA_RBDEADLOCK = XA_RBBASE + 2;
0N/A
0N/A /**
0N/A * A condition that violates the integrity of the resource was detected.
0N/A */
0N/A public final static int XA_RBINTEGRITY = XA_RBBASE + 3;
0N/A
0N/A /**
0N/A * The resource manager rolled back the transaction branch for a reason
0N/A * not on this list.
0N/A */
0N/A public final static int XA_RBOTHER = XA_RBBASE + 4;
0N/A
0N/A /**
0N/A * A protocol error occurred in the resource manager.
0N/A */
0N/A public final static int XA_RBPROTO = XA_RBBASE + 5;
0N/A
0N/A /**
0N/A * A transaction branch took too long.
0N/A */
0N/A public final static int XA_RBTIMEOUT = XA_RBBASE + 6;
0N/A
0N/A /**
0N/A * May retry the transaction branch.
0N/A */
0N/A public final static int XA_RBTRANSIENT = XA_RBBASE + 7;
0N/A
0N/A /**
0N/A * The inclusive upper bound of the rollback error code.
0N/A */
0N/A public final static int XA_RBEND = XA_RBTRANSIENT;
0N/A
0N/A /**
0N/A * Resumption must occur where the suspension occurred.
0N/A */
0N/A public final static int XA_NOMIGRATE = 9;
0N/A
0N/A /**
0N/A * The transaction branch may have been heuristically completed.
0N/A */
0N/A public final static int XA_HEURHAZ = 8;
0N/A
0N/A /**
0N/A * The transaction branch has been heuristically committed.
0N/A */
0N/A public final static int XA_HEURCOM = 7;
0N/A
0N/A /**
0N/A * The transaction branch has been heuristically rolled back.
0N/A */
0N/A public final static int XA_HEURRB = 6;
0N/A
0N/A /**
0N/A * The transaction branch has been heuristically committed and
0N/A * rolled back.
0N/A */
0N/A public final static int XA_HEURMIX = 5;
0N/A
0N/A /**
0N/A * Routine returned with no effect and may be reissued.
0N/A */
0N/A public final static int XA_RETRY = 4;
0N/A
0N/A /**
0N/A * The transaction branch was read-only and has been committed.
0N/A */
0N/A public final static int XA_RDONLY = 3;
0N/A
0N/A /**
0N/A * There is an asynchronous operation already outstanding.
0N/A */
0N/A public final static int XAER_ASYNC = -2;
0N/A
0N/A /**
0N/A * A resource manager error has occurred in the transaction branch.
0N/A */
0N/A public final static int XAER_RMERR = -3;
0N/A
0N/A /**
0N/A * The XID is not valid.
0N/A */
0N/A public final static int XAER_NOTA = -4;
0N/A
0N/A /**
0N/A * Invalid arguments were given.
0N/A */
0N/A public final static int XAER_INVAL = -5;
0N/A
0N/A /**
0N/A * Routine was invoked in an inproper context.
0N/A */
0N/A public final static int XAER_PROTO = -6;
0N/A
0N/A /**
0N/A * Resource manager is unavailable.
0N/A */
0N/A public final static int XAER_RMFAIL = -7;
0N/A
0N/A /**
0N/A * The XID already exists.
0N/A */
0N/A public final static int XAER_DUPID = -8;
0N/A
0N/A /**
0N/A * The resource manager is doing work outside a global transaction.
0N/A */
0N/A public final static int XAER_OUTSIDE = -9;
0N/A
0N/A
0N/A}