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

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


    server.tpadvertiseTestRollbackOnlyTprecvTPEVDISCONIMMService();

    assertTrue(TX.tx_open() == TX.TX_OK);
    assertTrue(TX.tx_begin() == TX.TX_OK);

    Session cd = connection.tpconnect(
        RunServer.getServiceNameTestRollbackOnly2(), sendbuf,
        Connection.TPSENDONLY);
    cd.tpdiscon();

    TXINFO txinfo = new TXINFO();
    int inTx = TX.tx_info(txinfo);
    log.info("inTx=" + inTx);
    assertTrue(txinfo.transaction_state == TX.TX_ROLLBACK_ONLY);
View Full Code Here


    server.tpadvertiseTestRollbackOnlyTprecvTPEVSVCFAILService();

    assertTrue(TX.tx_open() == TX.TX_OK);
    assertTrue(TX.tx_begin() == TX.TX_OK);

    Session cd = connection.tpconnect(
        RunServer.getServiceNameTestRollbackOnly2(), sendbuf,
        Connection.TPRECVONLY);

    try {
      cd.tprecv(0);
      fail("Expected e.getEvent() == Connection.TPEV_SVCFAIL");
    } catch (ResponseException e) {
      assertTrue(e.getEvent() == Connection.TPEV_SVCFAIL);
      assertTrue(e.getTperrno() == Connection.TPEEVENT);
      Buffer rcvbuf = e.getReceived();
View Full Code Here

  public void test() throws ConnectionException {
    log.info("TestSpecExampleTwo::test_specexampletwo");
    long len = 0;
    // TODO long event = 0; /* X_C_TYPE and subtype inq_buf. The structure
    // */
    Session cd; /* contains a character array named input and an */
    /* array of integers named output. */
    /* allocate typed buffer */
    Buffer ptr = connection.tpalloc("X_C_TYPE", "inq_buf", 0);

    /* populate typed buffer with input data */
    ((X_C_TYPE) ptr).setByteArray("input",
        "retrieve all accounts with balances less than 0".getBytes());
    // TODO tx_begin(); /* start global transaction */
    /* connect to conversational service, send input data, & yield control */
    cd = connection.tpconnect(RunServer.getServiceNameINQUIRY(), ptr,
        Connection.TPRECVONLY | Connection.TPSIGRSTRT);
    do {

      try {
        /* receive 10 account records at a time */
        ptr = cd.tprecv(Connection.TPSIGRSTRT);
        /*
         * Format & display in AP-specific manner the accounts returned.
         */
      } catch (ResponseException e) {
        if (e.getTperrno() == Connection.TPEEVENT
View Full Code Here

    server.tpadvertiseTestRollbackOnlyTprecvTPEVDISCONIMMService();

    assertTrue(TX.tx_open() == TX.TX_OK);
    assertTrue(TX.tx_begin() == TX.TX_OK);

    Session cd = connection.tpconnect(
        RunServer.getServiceNameTestRollbackOnly2(), sendbuf,
        Connection.TPSENDONLY);
    cd.tpdiscon();

    TXINFO txinfo = new TXINFO();
    int inTx = TX.tx_info(txinfo);
    log.info("inTx=" + inTx);
    assertTrue(txinfo.transaction_state == TX.TX_ROLLBACK_ONLY);
View Full Code Here

    server.tpadvertiseTestRollbackOnlyTprecvTPEVSVCFAILService();

    assertTrue(TX.tx_open() == TX.TX_OK);
    assertTrue(TX.tx_begin() == TX.TX_OK);

    Session cd = connection.tpconnect(
        RunServer.getServiceNameTestRollbackOnly2(), sendbuf,
        Connection.TPRECVONLY);

    try {
      cd.tprecv(0);
      fail("Expected e.getEvent() == Connection.TPEV_SVCFAIL");
    } catch (ResponseException e) {
      assertTrue(e.getEvent() == Connection.TPEV_SVCFAIL);
      assertTrue(e.getTperrno() == Connection.TPEEVENT);
      Buffer rcvbuf = e.getReceived();
View Full Code Here

  public void test() throws ConnectionException {
    log.info("TestSpecExampleTwo::test_specexampletwo");
    long len = 0;
    // TODO long event = 0; /* X_C_TYPE and subtype inq_buf. The structure
    // */
    Session cd; /* contains a character array named input and an */
    /* array of integers named output. */
    /* allocate typed buffer */
    Buffer ptr = connection.tpalloc("X_C_TYPE", "inq_buf", 0);

    /* populate typed buffer with input data */
    ((X_C_TYPE) ptr).setByteArray("input",
        "retrieve all accounts with balances less than 0".getBytes());
    // TODO tx_begin(); /* start global transaction */
    /* connect to conversational service, send input data, & yield control */
    cd = connection.tpconnect(RunServer.getServiceNameINQUIRY(), ptr,
        Connection.TPRECVONLY | Connection.TPSIGRSTRT);
    do {

      try {
        /* receive 10 account records at a time */
        ptr = cd.tprecv(Connection.TPSIGRSTRT);
        /*
         * Format & display in AP-specific manner the accounts returned.
         */
      } catch (ResponseException e) {
        if (e.getTperrno() == Connection.TPEEVENT
View Full Code Here

TOP

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

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.