Class XAManagedConnection

    • Field Detail

      • xaConnection

        protected final XAConnection xaConnection
        The XA connection
      • xaResource

        protected final XAResource xaResource
        The XAResource
      • currentXid

        protected Xid currentXid
        The Xid
    • Constructor Detail

      • XAManagedConnection

        public XAManagedConnection​(XAManagedConnectionFactory mcf,
                                   XAConnection xaConnection,
                                   Properties props,
                                   int transactionIsolation,
                                   int psCacheSize)
                            throws SQLException
        Constructor
        Parameters:
        mcf - The managed connection factory
        xaConnection - The XA connection
        props - The properties
        transactionIsolation - The transaction isolation
        psCacheSize - The prepared statement cache size
        Throws:
        SQLException - Thrown if an error occurs
    • Method Detail

      • begin

        public void begin()
                   throws javax.resource.ResourceException
        Specified by:
        begin in interface javax.resource.spi.LocalTransaction
        Throws:
        javax.resource.ResourceException
      • commit

        public void commit()
                    throws javax.resource.ResourceException
        Specified by:
        commit in interface javax.resource.spi.LocalTransaction
        Throws:
        javax.resource.ResourceException
      • rollback

        public void rollback()
                      throws javax.resource.ResourceException
        Specified by:
        rollback in interface javax.resource.spi.LocalTransaction
        Throws:
        javax.resource.ResourceException
      • broadcastConnectionError

        protected void broadcastConnectionError​(SQLException e)
      • getLocalTransaction

        public javax.resource.spi.LocalTransaction getLocalTransaction()
                                                                throws javax.resource.ResourceException
        Specified by:
        getLocalTransaction in interface javax.resource.spi.ManagedConnection
        Throws:
        javax.resource.ResourceException
      • getXAResource

        public XAResource getXAResource()
                                 throws javax.resource.ResourceException
        Specified by:
        getXAResource in interface javax.resource.spi.ManagedConnection
        Throws:
        javax.resource.ResourceException
      • destroy

        public void destroy()
                     throws javax.resource.ResourceException
        Destroy
        Specified by:
        destroy in interface javax.resource.spi.ManagedConnection
        Overrides:
        destroy in class BaseWrapperManagedConnection
        Throws:
        javax.resource.ResourceException - Thrown if an error occurs
      • isXA

        public boolean isXA()
        Returns true if the underlying connection is handled by an XA resource manager
        Specified by:
        isXA in class BaseWrapperManagedConnection
        Returns:
        The value