Package org.jboss.narayana.blacktie.jatmibroker.xatmi

Examples of org.jboss.narayana.blacktie.jatmibroker.xatmi.Response


      } else {
        buffer.append("dud");
      }
      toReturn.setByteArray("fail".getBytes());
    }
    return new Response(Connection.TPSUCCESS, 20, toReturn, 0);
  }
View Full Code Here


    int sendlen = 3;
    X_OCTET sendbuf = (X_OCTET) connection
        .tpalloc("X_OCTET", null, sendlen);
    sendbuf.setByteArray("24".getBytes());
    Response success = connection.tpcall(
        RunServer.getServiceNameTestTPReturn2(), sendbuf, 0);
    assertTrue(success != null);
    assertTrue(success.getRcode() == 24);

    sendbuf.setByteArray("77".getBytes());
    success = connection.tpcall(RunServer.getServiceNameTestTPReturn2(),
        sendbuf, 0);
    assertTrue(success != null);
    assertTrue(success.getRcode() == 77);
  }
View Full Code Here

    try {
      Thread.sleep(3 * 1000);
    } catch (InterruptedException e) {
      log.error("Could not sleep");
    }
    return new Response(Connection.TPSUCCESS, 0, toReturn, 0);
  }
View Full Code Here

      ConnectionException {
    log.info("testtpreturn_service_opensession1");
    svcinfo.getConnection().tpacall(
        RunServer.getServiceNameTestTPReturn2(), svcinfo.getBuffer(),
        svcinfo.getFlags());
    return new Response(Connection.TPSUCCESS, 0, svcinfo.getBuffer(), 0);
  }
View Full Code Here

  private static final Logger log = LogManager
      .getLogger(TPConnectService.class);

  public Response tpservice(TPSVCINFO svcinfo) {
    log.info("testtpconnect_service");
    return new Response(Connection.TPSUCCESS, 0, null, 0);
  }
View Full Code Here

    } else {
      rval = Connection.TPFAIL; /* global transaction will not commit */
      dc_ptr.setInt("output", TestSpecExampleOne.NOT_OK);
    }
    /* send reply and return from service routine */
    return new Response(rval, 0, dc_ptr, 0);
  }
View Full Code Here

    } else {
      rval = Connection.TPFAIL; /* global transaction will not commit */
    }
    /* terminate service routine, send no data, and */
    /* terminate connection */
    return new Response(rval, 0, null, 0);
  }
View Full Code Here

    X_OCTET sendbuf = (X_OCTET) svcinfo.getConnection().tpalloc("X_OCTET",
        null, sendlen);
    sendbuf.setByteArray("hi0".getBytes());
    svcinfo.getSession().tpsend(sendbuf, 0);
    sendbuf.setByteArray("hi1".getBytes());
    return new Response(Connection.TPSUCCESS, 0, sendbuf, 0);
  }
View Full Code Here

    log.info("testtpacall_service");
    int len = 20;
    X_OCTET toReturn = (X_OCTET) svcinfo.getConnection().tpalloc("X_OCTET",
        null, len);
    toReturn.setByteArray("testtpacall_service".getBytes());
    return new Response(Connection.TPSUCCESS, 0, toReturn, 0);
  }
View Full Code Here

    try {
      Thread.sleep(5000);
    } catch (InterruptedException e) {
      log.error("Was interrupted");
    }
    return new Response(Connection.TPSUCCESS, 0, toReturn, 0);
  }
View Full Code Here

TOP

Related Classes of org.jboss.narayana.blacktie.jatmibroker.xatmi.Response

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.