Examples of EmbedConnection


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

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.con.realConnection == conn) ||
                    (tranState.creatingResource.con.realConnection == null)) {
               
                tranState.creatingResource.con.realConnection = conn;
               
                BrokeredConnection handle =
                        tranState.creatingResource.con.currentConnectionHandle;
               
                conn.setApplicationConnection(handle);
               
                if (handle != null) {
                    try {
                        handle.setState(true);
                    } catch (SQLException sqle) {
View Full Code Here

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

     */
    public static void checkEstimatedRowCount(Connection conn, double expectedCount) throws SQLException {
  if (! (conn instanceof EmbedConnection))
      return;
 
  EmbedConnection econn = (EmbedConnection) conn;
  RunTimeStatistics rts = econn.getLanguageConnection().getRunTimeStatisticsObject();
  assertNotNull(" RuntimeStatistics is null. Did you call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)?",rts);
  assertEquals((long) expectedCount, (long) rts.getEstimatedRowCount());
  }
View Full Code Here

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

     */
    public static void checkEstimatedRowCount(Connection conn, double expectedCount) throws SQLException {
  if (! (conn instanceof EmbedConnection))
      return;
 
  EmbedConnection econn = (EmbedConnection) conn;
  RunTimeStatistics rts = econn.getLanguageConnection().getRunTimeStatisticsObject();
  assertNotNull(" RuntimeStatistics is null. Did you call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)?",rts);
  assertEquals((long) expectedCount, (long) rts.getEstimatedRowCount());
  }
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.con.realConnection == conn) ||
                    (tranState.creatingResource.con.realConnection == null)) {
               
                tranState.creatingResource.con.realConnection = conn;
               
                BrokeredConnection handle =
                        tranState.creatingResource.con.currentConnectionHandle;
               
                conn.setApplicationConnection(handle);
               
                if (handle != null) {
                    try {
                        handle.setState(true);
                    } catch (SQLException sqle) {
View Full Code Here

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

     */
    public static void checkEstimatedRowCount(Connection conn, double expectedCount) throws SQLException {
  if (! (conn instanceof EmbedConnection))
      return;
 
  EmbedConnection econn = (EmbedConnection) conn;
  RunTimeStatistics rts = econn.getLanguageConnection().getRunTimeStatisticsObject();
  assertNotNull(" RuntimeStatistics is null. Did you call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)?",rts);
  assertEquals((long) expectedCount, (long) rts.getEstimatedRowCount());
  }
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.con.realConnection == conn) ||
                    (tranState.creatingResource.con.realConnection == null)) {
               
                tranState.creatingResource.con.realConnection = conn;
               
                BrokeredConnection handle =
                        tranState.creatingResource.con.currentConnectionHandle;
               
                conn.setApplicationConnection(handle);
               
                if (handle != null) {
                    try {
                        handle.setState(true);
                    } catch (SQLException sqle) {
View Full Code Here

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

     */
    public static void checkEstimatedRowCount(Connection conn, double expectedCount) throws SQLException {
  if (! (conn instanceof EmbedConnection))
      return;
 
  EmbedConnection econn = (EmbedConnection) conn;
  RunTimeStatistics rts = econn.getLanguageConnection().getRunTimeStatisticsObject();
  assertNotNull(" RuntimeStatistics is null. Did you call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)?",rts);
  assertEquals((long) expectedCount, (long) rts.getEstimatedRowCount());
  }
View Full Code Here

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

              l-8, SignedBinary.BIG_ENDIAN); // as "long" as unique
          session.drdaID = reader.convertBytes(part1) +
                  time + leftBrace + session.connNum + rightBrace;
          if (SanityManager.DEBUG)
            trace("******************************************drdaID is: " + session.drdaID);
          EmbedConnection conn = (EmbedConnection)(database.getConnection());
          if (conn != null)
            conn.setDrdaID(session.drdaID);
          break;
        //required
        case CodePoint.RDBNAM:
          String dbname = parseRDBNAM();
          if (database != null)
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.