Package com.mysql.jdbc.jdbc2.optional

Examples of com.mysql.jdbc.jdbc2.optional.SuspendableXAConnection


  public void testBug46925() throws Exception {
    MysqlXADataSource xads1 = new MysqlXADataSource();
    MysqlXADataSource xads2 = new MysqlXADataSource();

    Xid txid = new MysqlXid(new byte[] { 0x1 }, new byte[] { 0xf }, 3306);

    xads1.setPinGlobalTxToPhysicalConnection(true);
    xads1.setUrl(dbUrl);

    xads2.setPinGlobalTxToPhysicalConnection(true);
View Full Code Here


    dataSource.setUrl(dbUrl);
   
    XAConnection testXAConn1 = dataSource.getXAConnection();
    XAConnection testXAConn2 = dataSource.getXAConnection();

    Xid duplicateXID = new MysqlXid("1".getBytes(), "1".getBytes(), 1);

    testXAConn1.getXAResource().start(duplicateXID, 0);

    try {
      testXAConn2.getXAResource().start(duplicateXID, 0);
View Full Code Here

  public void testBug46925() throws Exception {
    MysqlXADataSource xads1 = new MysqlXADataSource();
    MysqlXADataSource xads2 = new MysqlXADataSource();

    Xid txid = new MysqlXid(new byte[] { 0x1 }, new byte[] { 0xf }, 3306);

    xads1.setPinGlobalTxToPhysicalConnection(true);
    xads1.setUrl(dbUrl);

    xads2.setPinGlobalTxToPhysicalConnection(true);
View Full Code Here

   
    new UID().write(dataOut);
   
    final byte[] bqual = bqualOut.toByteArray();
   
    Xid xid = new MysqlXid(gtrid, bqual, 3306);
    return xid;
  }
View Full Code Here

   
    new UID().write(dataOut);
   
    final byte[] bqual = bqualOut.toByteArray();
   
    Xid xid = new MysqlXid(xidToBranch.getGlobalTransactionId(), bqual, 3306);
   
    return xid;
  }
View Full Code Here

  public void testBug46925() throws Exception {
    MysqlXADataSource xads1 = new MysqlXADataSource();
    MysqlXADataSource xads2 = new MysqlXADataSource();

    Xid txid = new MysqlXid(new byte[] { 0x1 }, new byte[] { 0xf }, 3306);

    xads1.setPinGlobalTxToPhysicalConnection(true);
    xads1.setUrl(dbUrl);

    xads2.setPinGlobalTxToPhysicalConnection(true);
View Full Code Here

  public void testBug46925() throws Exception {
    MysqlXADataSource xads1 = new MysqlXADataSource();
    MysqlXADataSource xads2 = new MysqlXADataSource();

    Xid txid = new MysqlXid(new byte[] { 0x1 }, new byte[] { 0xf }, 3306);

    xads1.setPinGlobalTxToPhysicalConnection(true);
    xads1.setUrl(dbUrl);

    xads2.setPinGlobalTxToPhysicalConnection(true);
View Full Code Here

   
    new UID().write(dataOut);
   
    final byte[] bqual = bqualOut.toByteArray();
   
    Xid xid = new MysqlXid(gtrid, bqual, 3306);
    return xid;
  }
View Full Code Here

   
    new UID().write(dataOut);
   
    final byte[] bqual = bqualOut.toByteArray();
   
    Xid xid = new MysqlXid(xidToBranch.getGlobalTransactionId(), bqual, 3306);
   
    return xid;
  }
View Full Code Here

    public static XAConnection createXAConnection(Connection physicalConn) throws SQLException {
      com.mysql.jdbc.ConnectionImpl mysqlConn = (com.mysql.jdbc.ConnectionImpl)physicalConn;
      if(mysqlConn.getPinGlobalTxToPhysicalConnection()) {

        if (!Util.isJdbc4()) {
          return new SuspendableXAConnection(mysqlConn);
        }

        return new com.mysql.jdbc.jdbc2.optional.JDBC4SuspendableXAConnection(mysqlConn);
     
      }
View Full Code Here

TOP

Related Classes of com.mysql.jdbc.jdbc2.optional.SuspendableXAConnection

Copyright © 2018 www.massapicom. 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.