Examples of EmbedConnection


Examples of org.apache.derby.impl.jdbc.EmbedConnection

        throw new XAException(XAException.XAER_PROTO);

      if (tranState.isPrepared)
        throw new XAException(XAException.XAER_PROTO);

      EmbedConnection conn = tranState.conn;

      try {

        int ret = conn.xa_prepare();

        if (ret == XATransactionController.XA_OK) {
          tranState.isPrepared = true;

          return XAResource.XA_OK;
View Full Code Here

Examples of org.apache.derby.impl.jdbc.EmbedConnection

        throw new XAException(XAException.XAER_PROTO);

      if (tranState.isPrepared == onePhase)
        throw new XAException(XAException.XAER_PROTO);

      EmbedConnection conn = tranState.conn;

      try {

        conn.xa_commit(onePhase);

      } catch (SQLException sqle) {
        throw wrapInXAException(sqle);
      } finally {
        returnConnectionToResource(tranState, xid_im);
View Full Code Here

Examples of org.apache.derby.impl.jdbc.EmbedConnection

    synchronized (tranState) {
      // global transaction is over.
      tranState.associationState = XATransactionState.TC_COMPLETED;
      tranState.notifyAll();

      EmbedConnection conn = tranState.conn;

      // already set in its own resource
      // or can it be returned to its original resource?
      if ((tranState.creatingResource.realConnection == conn) ||
        (tranState.creatingResource.realConnection == null)) {

        tranState.creatingResource.realConnection = conn;

        BrokeredConnection handle = tranState.creatingResource.currentConnectionHandle;

        conn.setApplicationConnection(handle);

        if (handle != null) {
          try {
            handle.setState(true);
          } catch (SQLException sqle) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.