use of org.jboss.narayana.blacktie.jatmibroker.xatmi.Response in project narayana by jbosstm.
the class TPACallService method tpservice.
public Response tpservice(TPSVCINFO svcinfo) throws ConnectionException, ConfigurationException {
log.info("testtpacall_service");
int len = 20;
X_OCTET toReturn = (X_OCTET) svcinfo.getConnection().tpalloc("X_OCTET", null);
toReturn.setByteArray("testtpacall_service".getBytes());
return new Response(Connection.TPSUCCESS, 0, toReturn, 0);
}
use of org.jboss.narayana.blacktie.jatmibroker.xatmi.Response in project narayana by jbosstm.
the class TPCallXOctetZeroService method tpservice.
public Response tpservice(TPSVCINFO svcinfo) throws ConnectionException, ConfigurationException {
byte[] recv = ((X_OCTET) svcinfo.getBuffer()).getByteArray();
byte[] toSend = new byte[recv.length];
int j = recv.length;
for (int i = 0; i < toSend.length; i++) {
toSend[i] = recv[--j];
}
X_OCTET toReturn = (X_OCTET) svcinfo.getConnection().tpalloc("X_OCTET", null);
toReturn.setByteArray(toSend);
return new Response((short) 0, 0, toReturn, 0);
}
use of org.jboss.narayana.blacktie.jatmibroker.xatmi.Response 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);
}
use of org.jboss.narayana.blacktie.jatmibroker.xatmi.Response in project narayana by jbosstm.
the class RollbackOnlyTprecvTPEVSVCFAILService method tpservice.
public Response tpservice(TPSVCINFO svcinfo) throws ConnectionException, ConfigurationException {
log.info("test_tprecv_TPEV_SVCFAIL_service");
int len = 60;
X_OCTET toReturn = (X_OCTET) svcinfo.getConnection().tpalloc("X_OCTET", null);
toReturn.setByteArray("test_tprecv_TPEV_SVCFAIL_service".getBytes());
return new Response(Connection.TPFAIL, 0, toReturn, 0);
}
use of org.jboss.narayana.blacktie.jatmibroker.xatmi.Response in project narayana by jbosstm.
the class RollbackOnlyTpcallTPESVCFAILService method tpservice.
public Response tpservice(TPSVCINFO svcinfo) throws ConnectionException, ConfigurationException {
log.info("test_tpcall_TPESVCFAIL_service");
int len = 60;
X_OCTET toReturn = (X_OCTET) svcinfo.getConnection().tpalloc("X_OCTET", null);
toReturn.setByteArray("test_tpcall_TPESVCFAIL_service".getBytes());
return new Response(Connection.TPFAIL, 0, toReturn, 0);
}
Aggregations