TestRollbackOnlyTpcallTPESVCFAILService.java
上传用户:xfwatch
上传日期:2020-12-14
资源大小:872k
文件大小:1k
源码类别:

中间件编程

开发平台:

Java

  1. package org.jboss.blacktie.jatmibroker.tx;
  2. import org.apache.log4j.LogManager;
  3. import org.apache.log4j.Logger;
  4. import org.jboss.blacktie.jatmibroker.xatmi.BlacktieService;
  5. import org.jboss.blacktie.jatmibroker.xatmi.Connection;
  6. import org.jboss.blacktie.jatmibroker.xatmi.ConnectionException;
  7. import org.jboss.blacktie.jatmibroker.xatmi.Response;
  8. import org.jboss.blacktie.jatmibroker.xatmi.TPSVCINFO;
  9. import org.jboss.blacktie.jatmibroker.xatmi.X_OCTET;
  10. public class TestRollbackOnlyTpcallTPESVCFAILService implements BlacktieService {
  11. private static final Logger log = LogManager
  12. .getLogger(TestRollbackOnlyTpcallTPESVCFAILService.class);
  13. public Response tpservice(TPSVCINFO svcinfo) {
  14. try {
  15. log.info("test_tpcall_TPESVCFAIL_service");
  16. int len = 60;
  17. X_OCTET toReturn = (X_OCTET) svcinfo.tpalloc("X_OCTET", null);
  18. toReturn.setByteArray("test_tpcall_TPESVCFAIL_service".getBytes());
  19. return new Response(Connection.TPFAIL, 0, toReturn, len, 0);
  20. } catch (ConnectionException e) {
  21. return new Response(Connection.TPFAIL, Connection.TPEOTYPE, null,
  22. 0, 0);
  23. }
  24. }
  25. }