Exemplo n.º 1
0
  public static void main(String[] args) {

    JtObject main = new JtObject();
    JtMessage msg1, msg2;
    // Integer count;

    // main.setObjTrace (1);
    // main.setLogFile ("log.txt");

    msg1 = new JtMessage();
    msg2 = new JtMessage();

    msg1.setMsgId("JtGET_DATE");
    // msg2.setMsgId ("JtMessage2");

    // Create template object

    main.createObject("Jt.examples.DateService", "template");

    // Send JtMessage1

    System.out.println((String) main.sendMessage("template", msg1));

    // Send JtMessage2

    main.sendMessage("template", msg2);

    main.removeObject("template");
  }
Exemplo n.º 2
0
  public void handleException(Throwable ex) {

    JtJBPMAdapter jbpmAdapter = null;

    try {
      if (context != null) {
        jbpmAdapter = (JtJBPMAdapter) context.getContextInstance().getVariable("JtJBPMAdapter");
      }
      if (jbpmAdapter != null)
        jbpmAdapter.setObjException(ex); // Propagate the exception to the JBPM adapter

    } catch (Exception ex1) {

    }
    super.handleException(ex);
  }