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

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


  public Response tpservice(TPSVCINFO svcinfo) throws ConnectionException {
    X_OCTET rcvd = (X_OCTET) svcinfo.getBuffer();
    X_OCTET buffer = (X_OCTET) svcinfo.getConnection().tpalloc("X_OCTET",
        null, rcvd.getByteArray().length);
    buffer.setByteArray(rcvd.getByteArray());
    return new Response(Connection.TPSUCCESS, 0, buffer, 0);
  }
View Full Code Here


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

        X_OCTET buffer = (X_OCTET) connection.tpalloc("X_OCTET", null,
            echo.length);
        buffer.setByteArray(echo);

        log.info("Invoking TxCreateService...");
        Response response = connection.tpcall("TxCreateService",
            buffer, 0);
        X_OCTET rcvd = (X_OCTET) response.getBuffer();
        String responseData = new String(rcvd.getByteArray());
        log.info("TxCreateService response: " + responseData);

        // check that the remote service created a transaction
        JABTransaction tx = JABTransaction.current();
View Full Code Here

      resp = e.getMessage();
    }
    X_OCTET buffer = (X_OCTET) svcinfo.getConnection().tpalloc("X_OCTET",
        null, resp.length());
    buffer.setByteArray(resp.getBytes());
    return new Response(Connection.TPSUCCESS, 0, buffer, 0);
  }
View Full Code Here

      int len = 60;
      X_OCTET toReturn = (X_OCTET) svcinfo.getConnection().tpalloc(
          "X_OCTET", null, len);
      toReturn.setByteArray("test_tpcall_TPETIME_service".getBytes());
      return new Response(Connection.TPSUCCESS, 0, toReturn, 0);
    } catch (InterruptedException e) {
      return new Response(Connection.TPFAIL, 0, null, 0);
    }
  }
View Full Code Here

    log.info("test_tpcall_TPEOTYPE_service");
    int len = 60;
    X_COMMON toReturn = (X_COMMON) svcinfo.getConnection().tpalloc(
        "X_COMMON", "test", len);
    toReturn.setByteArray("key", "test_tpcall_TPEOTYPE_service".getBytes());
    return new Response(Connection.TPSUCCESS, 0, toReturn, 0);
  }
View Full Code Here

      TransactionManager tm = (TransactionManager) context
          .lookup("java:/TransactionManager");
      tm.begin();
    } catch (Exception e) {
      log.error("Caught an exception", e);
      return new Response(Connection.TPFAIL, 0, null, 0);
    }

    return new Response(Connection.TPSUCCESS, 0, svcinfo.getBuffer(), 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.