TestRollbackOnlyTprecvTPEVSVCFAILService.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 TestRollbackOnlyTprecvTPEVSVCFAILService implements
  11. BlacktieService {
  12. private static final Logger log = LogManager
  13. .getLogger(TestRollbackOnlyTprecvTPEVSVCFAILService.class);
  14. public Response tpservice(TPSVCINFO svcinfo) {
  15. try {
  16. log.info("test_tprecv_TPEV_SVCFAIL_service");
  17. int len = 60;
  18. X_OCTET toReturn = (X_OCTET) svcinfo.tpalloc("X_OCTET", null);
  19. toReturn
  20. .setByteArray("test_tprecv_TPEV_SVCFAIL_service".getBytes());
  21. return new Response(Connection.TPFAIL, 0, toReturn, len, 0);
  22. } catch (ConnectionException e) {
  23. return new Response(Connection.TPFAIL, Connection.TPEITYPE, null,
  24. 0, 0);
  25. }
  26. }
  27. }