Examples of ParticipantException


Examples of jifx.transactionManager.interfaces.ParticipantException

  }

  public void prepare(Context ctx) throws ParticipantException, ValidatorException {
    LinkFactory lf = LinkFactory.getFactory();
    if (properties.get("link") == null)
      throw new ParticipantException("Prepare Error: Falta configurar propiedad <link>");

    ILink lnk = lf.getLinkChannel(properties.get("link"));
    try {
      IMessage message = ctx.getOriginalMessage();
      logger.info("Send message: "+message.toString());
      IMessage msg = lnk.sendReceiveMessage(message);
      logger.info("Receive message: "+msg.toString());
      ctx.put("responsePOS", msg);
    } catch (ComunicationException e) {
      throw new ParticipantException("Prepare Error: " + e.toString());
    }

  }
View Full Code Here

Examples of jifx.transactionManager.interfaces.ParticipantException

  public void prepare(Context ctx) throws ParticipantException {
    try {
        String brand = properties.get("BRAND");
        if (brand == null || brand.trim().equals(""))
          throw new ParticipantException("En el participante ValidationParticipant debe especificar el par�metro: BRAND");
        String jndi = properties.get("jndi");
        if (jndi == null || jndi.trim().equals(""))
          jndi = "localhost:1099";
       
        Hashtable<String, String> env = new Hashtable<String, String>();
        env.put("java.naming.factory.initial", "org.jboss.naming.NamingContextFactory");
        env.put("java.naming.provider.url", jndi);
        InitialContext context = new InitialContext(env);
        IClient remote = (IClient) context.lookup("ClientImp/remote");

        IMessage message = ctx.getOriginalMessage();
       
        String login = (String) message.getElement("SignonRq.SignonPswd.CustId.SPName");
        String type = (String) message.getElement("SignonRq.SignonPswd.CustPswd.CryptType");
        String pwd = (String) message.getElement("SignonRq.SignonPswd.CustPswd.Pswd");

        Client clientReg = remote.getClient(brand, login);
        Client clientRq = new Client(brand, login, type, pwd);
        if (clientReg != null && ValidationManager.validate(clientReg, clientRq))
          return;
        throw new ValidationException(clientReg, clientRq);
    } catch (NamingException e) {
      throw new ParticipantException(e.getMessage());
    }       
  }
View Full Code Here

Examples of jifx.transactionManager.interfaces.ParticipantException

  public void prepare(Context ctx) throws ParticipantException, ValidatorException {
      try {
        LinkFactory lf = LinkFactory.getFactory();
        if (properties.get("link") == null)
          throw new ParticipantException("Prepare Error: Falta configurar propiedad <link>");
        ILink link = lf.getLinkChannel(properties.get("link"));
       
        IMessage msg = ctx.getOriginalMessage();
        String id = (String) msg.getElement("11");
        String term = (String) msg.getElement("41");
View Full Code Here

Examples of jifx.transactionManager.interfaces.ParticipantException

        //IMessage msgCabal = IFXMessageFactory.createMessageCompraMinRequest(id, term, String.valueOf(1*Integer.valueOf(reg[1])), card);
        ILink ilink = LinkFactory.getFactory().getLinkChannel(link);
        IMessage res = ilink.sendReceiveMessage(msgISO);
        ctx.put("DescuentoParticipant_RES", res);             
      } catch (ComunicationException e) {
          throw new ParticipantException(e.getMessage());
      }
  }
View Full Code Here

Examples of jifx.transactionManager.interfaces.ParticipantException

//                } else
//              throw new ParticipantException("El valor en el campo BankSvcRq.DebitAddRq.MsgRqHdr.ClientTerminalSeqId no es num�rico.");

               
      } catch (ComunicationException e) {
          throw new ParticipantException(e.getMessage());
      }
  }
View Full Code Here

Examples of jifx.transactionManager.interfaces.ParticipantException

                    ILink link = LinkFactory.getFactory().getLinkChannel(properties.get("link"));
                    IMessage res = link.sendReceiveMessage(iso);
                    ctx.put("RESPONSE", res);
                    System.out.println("Respuesta: " + res);
                } else
              throw new ParticipantException("El valor en el campo BankSvcRq.DebitAddRq.MsgRqHdr.ClientTerminalSeqId no es num�rico.");

               
      } catch (ComunicationException e) {
          throw new ParticipantException(e.getMessage());
      }
  }
View Full Code Here

Examples of jifx.transactionManager.interfaces.ParticipantException

  }

  public void prepare(Context ctx) throws ParticipantException, ValidatorException {
    LinkFactory lf = LinkFactory.getFactory();
    if (properties.get("link") == null)
      throw new ParticipantException("Prepare Error: Falta configurar propiedad <link>");               
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.