1. /*
  2. * @(#)XAConnection.java 1.7 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.sql;
  8. import java.sql.*;
  9. /**
  10. * An object that provides support for distributed
  11. * transactions. An <code>XAConnection</code> object may be enlisted
  12. * in a distributed transaction by means of an <code>XAResource</code> object.
  13. * A transaction manager, usually part of a middle tier server, manages an
  14. * <code>XAConnection</code> object through the <code>XAResource</code> object.
  15. * <P>
  16. * An application programmer does not use this interface directly; rather,
  17. * it is used by a transaction manager working in the middle tier server.
  18. *
  19. * @since 1.4
  20. */
  21. public interface XAConnection extends PooledConnection {
  22. /**
  23. * Retrieves an <code>XAResource</code> object that
  24. * the transaction manager will use
  25. * to manage this <code>XAConnection</code> object's participation in a
  26. * distributed transaction.
  27. *
  28. * @return the <code>XAResource</code> object
  29. * @exception SQLException if a database access error occurs
  30. */
  31. javax.transaction.xa.XAResource getXAResource() throws SQLException;
  32. }