Examples of XidImpl


Examples of org.teiid.client.xa.XidImpl

        assertEquals(XID1, XID1Copy);
        assertFalse(XID1.equals(XID2));
    }
   
    public void testCopyConstructor() {
        XidImpl xidcopy = new XidImpl(XID1);
        assertEquals(XID1Copy, xidcopy);
        assertNotSame(XID1Copy, xidcopy);
    }
View Full Code Here

Examples of org.teiid.client.xa.XidImpl

    assertTrue(conn.getAutoCommit());
   
    conn = xaConn.getConnection();
    stmt = (StatementImpl)conn.createStatement();
    XAResource resource = xaConn.getXAResource();
    resource.start(new XidImpl(1, new byte[0], new byte[0]), XAResource.TMNOFLAGS);
    conn.close();
   
    assertTrue(stmt.isClosed());
    assertTrue(conn.getAutoCommit());
  }
View Full Code Here

Examples of org.teiid.client.xa.XidImpl

     
  /**
     * @see javax.transaction.xa.XAResource#commit(javax.transaction.xa.Xid, boolean)
     */
    public void commit(Xid xid, boolean onePhase) throws XAException {
      XidImpl mmXid = getMMXid(xid);
    try{
      getMMConnection().commitTransaction(mmXid, onePhase);  
    }catch(SQLException e){
      String logMsg = JDBCPlugin.Util.getString("MMXAResource.FailedCommitTXN", xid, onePhase ? "true":"false"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      throw handleError(e, logMsg);
View Full Code Here

Examples of org.teiid.client.xa.XidImpl

  /**
     * @see javax.transaction.xa.XAResource#end(javax.transaction.xa.Xid, int)
     */
    public void end(Xid xid, int flag) throws XAException {
      XidImpl mmXid = getMMXid(xid);
    try{
            getMMConnection().endTransaction(mmXid, flag);  
    }catch(SQLException e){
            String logMsg = JDBCPlugin.Util.getString("MMXAResource.FailedEndTXN", xid, new Integer(flag)); //$NON-NLS-1$
            throw handleError(e, logMsg);
View Full Code Here

Examples of org.teiid.client.xa.XidImpl

    /**
     * @see javax.transaction.xa.XAResource#forget(javax.transaction.xa.Xid)
     */
    public void forget(Xid xid) throws XAException {
      XidImpl mmXid = getMMXid(xid);
    try{
            getMMConnection().forgetTransaction(mmXid);  
        }catch(SQLException e){
            String logMsg = JDBCPlugin.Util.getString("MMXAResource.FailedForgetTXN", xid); //$NON-NLS-1$
            throw handleError(e, logMsg);
View Full Code Here

Examples of org.teiid.client.xa.XidImpl

    /**
     * @see javax.transaction.xa.XAResource#prepare(javax.transaction.xa.Xid)
     */
    public int prepare(Xid xid) throws XAException {
      XidImpl mmXid = getMMXid(xid);
    try{
      return getMMConnection().prepareTransaction(mmXid);  
        }catch(SQLException e){
            String logMsg = JDBCPlugin.Util.getString("MMXAResource.FailedPrepareTXN", xid); //$NON-NLS-1$
            throw handleError(e, logMsg);
View Full Code Here

Examples of org.teiid.client.xa.XidImpl

    /**
     * @see javax.transaction.xa.XAResource#rollback(javax.transaction.xa.Xid)
     */
    public void rollback(Xid xid) throws XAException {
      XidImpl mmXid = getMMXid(xid);
    try{
            getMMConnection().rollbackTransaction(mmXid);  
        }catch(SQLException e){
            String logMsg = JDBCPlugin.Util.getString("MMXAResource.FailedRollbackTXN", xid); //$NON-NLS-1$
            throw handleError(e, logMsg);
View Full Code Here

Examples of org.teiid.client.xa.XidImpl

    /**
     * @see javax.transaction.xa.XAResource#start(javax.transaction.xa.Xid, int)
     */
    public void start(Xid xid, int flag) throws XAException {
      XidImpl mmXid = getMMXid(xid);
    try{
      getMMConnection().startTransaction(mmXid, flag, timeOut);  
        }catch(SQLException e){
            String logMsg = JDBCPlugin.Util.getString("MMXAResource.FailedStartTXN", xid, new Integer(flag)); //$NON-NLS-1$
            handleError(e, logMsg);
View Full Code Here

Examples of org.teiid.client.xa.XidImpl

   * @param xid
   * @return
     * @throws XAException
   */
  private XidImpl getMMXid(Xid originalXid) {
    return new XidImpl(originalXid);
  }
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.