Search in sources :

Example 1 with X_COMMON

use of org.jboss.narayana.blacktie.jatmibroker.xatmi.X_COMMON in project narayana by jbosstm.

the class RollbackOnlyTpcallTPEOTYPEService method tpservice.

public Response tpservice(TPSVCINFO svcinfo) throws ConnectionException, ConfigurationException {
    log.info("test_tpcall_TPEOTYPE_service");
    int len = 60;
    X_COMMON toReturn = (X_COMMON) svcinfo.getConnection().tpalloc("X_COMMON", "test");
    toReturn.setByteArray("key", "test_tpcall_TPEOTYPE_service".getBytes());
    return new Response(Connection.TPSUCCESS, 0, toReturn, 0);
}
Also used : Response(org.jboss.narayana.blacktie.jatmibroker.xatmi.Response) X_COMMON(org.jboss.narayana.blacktie.jatmibroker.xatmi.X_COMMON)

Example 2 with X_COMMON

use of org.jboss.narayana.blacktie.jatmibroker.xatmi.X_COMMON in project narayana by jbosstm.

the class TPCallXCommonService method tpservice.

public Response tpservice(TPSVCINFO svcinfo) throws ConnectionException, ConfigurationException {
    log.info("test_tpcall_x_common_service");
    boolean ok = false;
    X_COMMON dptr = (X_COMMON) svcinfo.getBuffer();
    if (dptr.getLong("acct_no") == 12345678 && dptr.getShort("amount") == 50) {
        ok = true;
    }
    int len = 60;
    X_OCTET toReturn = (X_OCTET) svcinfo.getConnection().tpalloc("X_OCTET", null);
    if (ok) {
        toReturn.setByteArray("tpcall_x_common".getBytes());
    } else {
        toReturn.setByteArray("fail".getBytes());
    }
    return new Response(Connection.TPSUCCESS, 22, toReturn, 0);
}
Also used : Response(org.jboss.narayana.blacktie.jatmibroker.xatmi.Response) X_OCTET(org.jboss.narayana.blacktie.jatmibroker.xatmi.X_OCTET) X_COMMON(org.jboss.narayana.blacktie.jatmibroker.xatmi.X_COMMON)

Aggregations

Response (org.jboss.narayana.blacktie.jatmibroker.xatmi.Response)2 X_COMMON (org.jboss.narayana.blacktie.jatmibroker.xatmi.X_COMMON)2 X_OCTET (org.jboss.narayana.blacktie.jatmibroker.xatmi.X_OCTET)1