This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation; version 2
of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this
program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth
Floor, Boston, MA 02110-1301 USA
*/
packagecom.mysql.jdbc.jdbc2.optional;
importjava.lang.reflect.Constructor;
importjava.sql.Connection;
importjava.sql.ResultSet;
importjava.sql.SQLException;
importjava.sql.Statement;
importjava.util.ArrayList;
importjava.util.Collections;
importjava.util.HashMap;
importjava.util.List;
importjava.util.Map;
importjavax.sql.XAConnection;
importjavax.transaction.xa.XAException;
importjavax.transaction.xa.XAResource;
importjavax.transaction.xa.Xid;
importcom.mysql.jdbc.Messages;
importcom.mysql.jdbc.StringUtils;
importcom.mysql.jdbc.Util;
importcom.mysql.jdbc.log.Log;
/*
* XA BEGIN <xid> [JOIN | RESUME] XA START TRANSACTION <xid> [JOIN | RESUME] XA
* COMMIT <xid> [ONE PHASE] XA END <xid> [SUSPEND [FOR MIGRATE]] XA PREPARE
* <xid> XA RECOVER XA ROLLBACK <xid>
*/
/**
* An object that provides support for distributed transactions. An <code>XAConnection</code> object may be enlisted in a distributed transaction by means of
* an <code>XAResource</code> object. A transaction manager, usually part of a middle tier server, manages an <code>XAConnection</code> object through the
* <code>XAResource</code> object.
*
* <P>
* An application programmer does not use this interface directly; rather, it is used by a transaction manager working in the middle tier server.
* The XA RECOVER statement returns information for those XA transactions on the MySQL server that are in the PREPARED state. (See Section 13.4.7.2, �XA
* Transaction States�.) The output includes a row for each such XA transaction on the server, regardless of which client started it.
*
* XA RECOVER output rows look like this (for an example xid value consisting of the parts 'abc', 'def', and 7):